Giter Club home page Giter Club logo

Comments (7)

dtschump avatar dtschump commented on September 27, 2024

Confirmed with :

#include "CImg.h"
using namespace cimg_library;

int main(int argc, char **argv) {

  CImg<unsigned char> img(256,256,256);
  img.rand(0,255);
  img.save("toto.tif");

  CImg<float> imgf("toto.tif");
  imgf.print();

  return 0;
}

Working on a fix. Thanks for reporting.

from cimg.

uxhub avatar uxhub commented on September 27, 2024

Thank you again for your reactivity

from cimg.

dtschump avatar dtschump commented on September 27, 2024

Confirmed only when libtiff is not used.
If you define #define cimg_use_tiff, then saving/reloading a 3d volumetric image works.
If you don't, then the tif is saved using an external call to ImageMagick or GraphicsMagick, and converted from a .ppm, so yes that cannot save multiple slices in this case.

from cimg.

dtschump avatar dtschump commented on September 27, 2024

What I can do is add a Warning message when trying to save a volumetric image using an external call to ImageMagick or GraphicsMagick. At least the user could understand what happens.

from cimg.

uxhub avatar uxhub commented on September 27, 2024

Well yes it happens only if #define cimg_use_tiff is not defined. I checked in a separate test case.
I thought I was using libtiff in my project, don't know why the #define cimg_use_tiff is not taken into account here.
However, the warning message seems a good idea. Thanks again.

from cimg.

dtschump avatar dtschump commented on September 27, 2024

Make sure you have defined the macro cimg_use_tiff before including CImg.h, it's a common mistake to place the define after the inclusion, and this does not work in this case.

from cimg.

uxhub avatar uxhub commented on September 27, 2024

Yes, I know that. Seems something else.

I close the thread.

from cimg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.