-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imagemagick image writer #1304
Imagemagick image writer #1304
Conversation
can someone check this PR ? Travis is having a problem with imagemagick but I'm not able to reproduce the bug.. |
help please;) |
The error with imagemagick seems related to a bad config path (some surfing indicates MAGICK_CONFIGURE_PATH but I have not checked it yet). For the internal g++-4.8 compiler error, I don't know. I had also ImageMagick problems on my Mac, I had to reinstall it (another version) and it worked. |
I checked also on my updated Mac and also on older version but also not able to reproduce the bug. |
@dcoeurjo I think I got it ;) ! I PR on your branch. |
Fix travis with MagickWriter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small edit can be merged.
I tested in a simple example ImageMagick Reader/Writer with DGtalColor image and all is fine! ;)
Color c = aFunctor( anImage(point) ); | ||
Magick::ColorRGB magickc( c.red()/255., c.green()/255., c.blue()/255.) ; | ||
image.pixelColor( point[0] + anImage.domain().lowerBound()[0], | ||
(h-1) - (point[1] + anImage.domain().lowerBound()[1]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anImage.domain().upperBound()[1]-point[1] ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks , I’ll check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should be the same.
src/DGtal/io/writers/MagickWriter.h
Outdated
BOOST_STATIC_ASSERT( (TImage::Domain::dimension == 2) ); | ||
|
||
/** | ||
* Export an Image with Imagemagick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImageMagick
src/DGtal/io/writers/MagickWriter.h
Outdated
/** | ||
* Export an Image with Imagemagick. | ||
* | ||
* @param filename name of the output file the suffix is used to select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file the -> file, the ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, fixed
Another comment, the integration with the GenericWriter could be nice, I am looking it, let me know if you think that I can PR on your branch or if you prefer another PR. |
Not tested yet but the integration within GenericReader is already there |
Sorry, you meant GenericWriter... |
Co-authored-by: Bertrand Kerautret <bertrand.kerautret@univ-lorraine.fr>
Comments fixed. I'm merging this PR, thanks. |
ok fine for me ;) |
PR Description
If ImageMagick dependency enabled, this PR adds a new writer to export images to (colored) PNG, JPG or any file format defined in ImageMagick.
Checklist
cmake
mode (otherwise, Travis C.I. will fail).