From news at ademmler.com Tue Nov 3 12:22:46 2009 From: news at ademmler.com (ademmler) Date: Tue, 3 Nov 2009 21:22:46 +0100 Subject: [magick-developers] PerlMagick: Transform may not work Message-ID: <182772CD-409B-44E8-B938-B56F64083E55@ademmler.com> Hi, I trying to use PerlMagick to rotate an image from his center. Therefore I want to use the "transform" function - unfortunatley nothing happens. Below my sample. Thx Alex use strict; use Image::Magick; my $file = $ARGV[0] || die "Missing input file\n"; my $test = Image::Magick->new(); $test->Set(density => '150'); $test->Read($file); $test->Transform(rotate=>'5', gravity=>'Center'); $test->Write('rot-'. $file); exit 0; From duc.sequere.aut.de.via.decede at imagemagick.org Tue Nov 3 12:28:32 2009 From: duc.sequere.aut.de.via.decede at imagemagick.org (duc.sequere.aut.de.via.decede at imagemagick.org) Date: Tue, 3 Nov 2009 12:28:32 -0800 Subject: [magick-developers] PerlMagick: Transform may not work Message-ID: <200911032028.nA3KSWqE003571@studio.imagemagick.org> > $test->Transform(rotate=>'5', gravity=>'Center'); > > $test->Write('rot-'. $file); Transform() returns an image. Try $transf = $test->Transform(rotate=>'5', gravity=>'Center'); $transf->Write('rot-'. $file); From A.Thyssen at griffith.edu.au Tue Nov 3 21:14:52 2009 From: A.Thyssen at griffith.edu.au (Anthony Thyssen) Date: Wed, 4 Nov 2009 15:14:52 +1000 Subject: [magick-developers] PerlMagick: Transform may not work In-Reply-To: <182772CD-409B-44E8-B938-B56F64083E55@ademmler.com> References: <182772CD-409B-44E8-B938-B56F64083E55@ademmler.com> Message-ID: <20091104151452.6f6373d8@wraith> On Tue, 3 Nov 2009 21:22:46 +0100 ademmler wrote: | Hi, | | I trying to use PerlMagick to rotate an image from his center. | Therefore I want to use the "transform" function - unfortunatley | nothing happens. | Below my sample. | | Thx Alex | | use strict; | use Image::Magick; | | my $file = $ARGV[0] || die "Missing input file\n"; | | my $test = Image::Magick->new(); | $test->Set(density => '150'); | $test->Read($file); | | $test->Transform(rotate=>'5', gravity=>'Center'); | | $test->Write('rot-'. $file); | try using the new distort function with the SRT method See details in http://www.imagemagick.org/Usage/distorts/#srt and the function in the "demo.pl" of the "demos" perl examples directory usally this is installed in /usr/share/doc/ImageMagick-perl-*/demo/demo.pl (search for Distort). The example is for an 'arc' distort but the same principles apply Anthony Thyssen ( System Programmer ) ----------------------------------------------------------------------------- Scotty: I beamed the whole kit and kaboodle over to the Klingons engine room... where they'll be no tribble at all. Startrek -- "The Trouble With Tribbles" ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ From news at ademmler.com Tue Nov 3 23:54:03 2009 From: news at ademmler.com (ademmler) Date: Wed, 4 Nov 2009 08:54:03 +0100 Subject: [magick-developers] PerlMagick: Transform may not work In-Reply-To: <20091104151452.6f6373d8@wraith> References: <182772CD-409B-44E8-B938-B56F64083E55@ademmler.com> <20091104151452.6f6373d8@wraith> Message-ID: Hi, sorry but I have to ask again. I have tried Distort to rotate from from center without succsess: $image->Distort(method=>'ScaleRotateTranslate', '5'); Alex > | try using the new distort function with the SRT method > See details in > http://www.imagemagick.org/Usage/distorts/#srt > > and the function in the "demo.pl" of the "demos" perl examples > directory > usally this is installed in > /usr/share/doc/ImageMagick-perl-*/demo/demo.pl > (search for Distort). The example is for an 'arc' distort but the > same > principles apply From news at ademmler.com Wed Nov 4 23:44:55 2009 From: news at ademmler.com (ademmler) Date: Thu, 5 Nov 2009 08:44:55 +0100 Subject: [magick-developers] PerlMagick: Transform may not work In-Reply-To: <20091105145450.52107449@wraith> References: <182772CD-409B-44E8-B938-B56F64083E55@ademmler.com> <20091104151452.6f6373d8@wraith> <20091105145450.52107449@wraith> Message-ID: <7EE9138B-2F6D-4D90-882D-638F987A15A5@ademmler.com> Dear Anthony, thx for you advice. I have tried this out but the script stays silent: no warnings nor error. But the image ist still not rotated. Here is my full testing code: #!/opt/local/bin/perl -w use strict; use Image::Magick; my $file = $ARGV[0] || die "Missing input file\n"; my $image = Image::Magick->new(); $image->Set(density => '150'); $image->Read($file); my $w = $image->Distort(method=>'ScaleRotateTranslate', '5'); warn("$w") if $w; exit if $w =~ /^Exception/; $image->Write('rot-'. $file); exit 0; Am 05.11.2009 um 05:54 schrieb Anthony Thyssen: > On Wed, 4 Nov 2009 08:54:03 +0100 > ademmler wrote: > > | Hi, > | > | sorry but I have to ask again. > | > | I have tried Distort to rotate from from center without succsess: > | > | $image->Distort(method=>'ScaleRotateTranslate', '5'); > | > | Alex > | > | > | try using the new distort function with the SRT method > | > See details in > | > http://www.imagemagick.org/Usage/distorts/#srt > | > > | > and the function in the "demo.pl" of the "demos" perl examples > | > directory > | > usally this is installed in > | > /usr/share/doc/ImageMagick-perl-*/demo/demo.pl > | > (search for Distort). The example is for an 'arc' distort but the > | > same > | > principles apply > > That should do a center rotate without any image size increase. > > If it is not working check the error return... > > my $w = $image->Distort(method=>'ScaleRotateTranslate', '5'); > warn("$w") if $w; > exit if $w =~ /^Exception/; > > > Anthony Thyssen ( System Programmer ) > -------------------------------------------------------------------------- > "Here, you're a zombie!" > "That's right, kick a man when he's dead." said Constable Shoe > sharply > -- Terry Pratchett, > "Jingo" > -------------------------------------------------------------------------- > Anthony's Home is his Castle http://www.cit.gu.edu.au/ > ~anthony/ From John.Ponte at jmp.com Mon Nov 9 06:59:05 2009 From: John.Ponte at jmp.com (John Ponte) Date: Mon, 9 Nov 2009 09:59:05 -0500 Subject: [magick-developers] EMF+ support Message-ID: Hello, I was wondering if there are any plans to add support for EMF+ to ImageMagick any time soon. We are using GDI+ at the host layer (on Windows) which fills the clipboard with an image in EMF+. Once this happens, I can't seem to do anything with it in ImageMagick. Thanks for any advice, John ----------------------------------------------------------------------- John Ponte Software Developer, JMP John.Ponte at jmp.com (919) 531-1978 www.jmp.com From piaff33z at gmail.com Tue Nov 17 11:44:41 2009 From: piaff33z at gmail.com (Piaff33z) Date: Tue, 17 Nov 2009 20:44:41 +0100 Subject: [magick-developers] [Fwd: problem to compile Magick++] Message-ID: <4B02FD29.6060006@gmail.com> hello, I wan't help for compile the lastest ImageMagick version 6.5.7-7. I set environnement variables below : CFFLAG = -I/opt/lib/zlib/include -I/opt/lib/libgd/include -I/opt/lib/libxml2/include -I/opt/lib/libpng/include -I/opt/fontconfig/include -I/opt/lib/libjpeg2k/include -I/opt/lib/fftw/include LDFLAGS = -L/opt/lib/zlib/lib -L/opt/lib/libgd/lib -L/opt/lib/libxml2/lib -L/opt/lib/libpng/lib -L/opt/fontconfig/lib -L/opt/lib/libjpeg2k/lib -L/opt/lib/fftw/lib I use the configure line below : ./configure --prefix=/opt/ImageMagick-6.5.7-7 --with-perl --with-fontconfig=yes --with-gnu-ld --with-modules --with-xml=yes All tests are done expect Magick++. Below an extract of test result. Option Value ------------------------------------------------------------------------------- Shared libraries --enable-shared=yes yes Static libraries --enable-static=yes yes Module support --with-modules=yes yes GNU ld --with-gnu-ld=yes yes Quantum depth --with-quantum-depth=16 16 High Dynamic Range Imagery --enable-hdri=no no Delegate Configuration: BZLIB --with-bzlib=yes yes Autotrace --with-autotrace=no no DJVU --with-djvu=yes no DPS --with-dps=yes no FFTW --with-fftw=yes yes FlashPIX --with-fpx=yes no FontConfig --with-fontconfig=yes yes FreeType --with-freetype=yes yes GhostPCL None pcl6 (unknown) GhostXPS None gxps (unknown) Ghostscript None gs () Ghostscript fonts --with-gs-font-dir=default /usr/share/ghostscript/fonts/ Ghostscript lib --with-gslib=no no Graphviz --with-gvc=yes no JBIG --with-jbig=yes no JPEG v1 --with-jpeg=yes yes JPEG-2000 --with-jp2=yes yes LCMS --with-lcms=yes no LQR --with-lqr=yes no Magick++ --with-magick-plus-plus=yes no (failed tests) OpenEXR --with-openexr=yes no PERL --with-perl=yes /usr/bin/perl PNG --with-png=yes yes RSVG --with-rsvg=no no TIFF --with-tiff=yes yes Windows fonts --with-windows-font-dir= none WMF --with-wmf=yes yes X11 --with-x= no XML --with-xml=yes yes ZLIB --with-zlib=yes yes I don't understand why magick-plus-plus tests fails. Furthermore, i think that i need this lib for to compile the perl module :-( Somebody can help me ? I attach to my mail an extract of my config.log, result for my configure. Thanks for your help ! Vic -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: config-extract.log Url: http://studio.imagemagick.org/pipermail/magick-developers/attachments/20091117/e3f1cc25/attachment-0001.ksh From duc.sequere.aut.de.via.decede at imagemagick.org Tue Nov 17 16:29:47 2009 From: duc.sequere.aut.de.via.decede at imagemagick.org (duc.sequere.aut.de.via.decede at imagemagick.org) Date: Tue, 17 Nov 2009 16:29:47 -0800 Subject: [magick-developers] [Fwd: problem to compile Magick++] Message-ID: <200911180029.nAI0Tld3017980@studio.imagemagick.org> > think that i need this lib for to compile the perl module PerlMagick does not require Magick++. To determine why the ImageMagick configure script failed to validate Magick++, see config.log. Fix the reported problem and rerun the configure script until Magick++ validates. If you do not need Magick++, add --without-magick-plus-plus to your configure script command line. From ksimek at email.arizona.edu Wed Nov 18 07:47:10 2009 From: ksimek at email.arizona.edu (Kyle Simek) Date: Wed, 18 Nov 2009 08:47:10 -0700 Subject: [magick-developers] possible Sun raster 32-bit bug? Message-ID: <4B0416FE.809@email.arizona.edu> I'm responsible for fixing a bug in a 3rd party library that's trying and failing to read 32-bit Sun raster images output by ImageMagick. After some investigation, I think I've stumbled onto a semi-obscure bug in ImageMagick's code for reading and writing 32-bit Sun raster images with odd widths. If it's not a bug, can someone explain what I'm misunderstanding about the format? It would help me document the bugfix in our library. The Sun raster format specifies that rows of pixels should be padded to be a multiple of 16 bits (in other words, an even number of bytes). For example, for a 24-bit image with width of 3 pixels, the unpadded row length is 9 bytes, but it should be padded up to 10 bytes. In ImageMagick, it looks like the width in pixels is rounded up to a multiple of two _before_ multiplying by the bytes-per-pixel, instead of rounding up the result. In other words, // current method bytes_per_row = num_cols * depth / 8; // could be even at this point... bytes_per_row += num_cols % 2; // ... but now is made odd // "right" way? bytes_per_row = num_cols * depth/8; // could be even at this point... bytes_per_row += bytes_per_row % 2; // ...if not, make even The two methods only differ semantically when depth is 16 or 32, both admittedly obscure depths for this format. However, the current way creates rows with odd numbers of bytes when depth is 16 or 32, which seems to violate Sun's requirement that row lengths be multiples of 16 bits. The "current way" above is implemented in ImageMagick 6.5.7-8 in file coders/sun.c at lines 841-842 and 533-534 (among other places). I think I'm probably just missing something in the spec, but if the mistake is at my end, I've seen at least two other implementations make the same mistake. I would much appreciate any light that could be shed on this. Thanks! Regards, Kyle Simek From duc.sequere.aut.de.via.decede at imagemagick.org Wed Nov 18 09:05:56 2009 From: duc.sequere.aut.de.via.decede at imagemagick.org (duc.sequere.aut.de.via.decede at imagemagick.org) Date: Wed, 18 Nov 2009 09:05:56 -0800 Subject: [magick-developers] possible Sun raster 32-bit bug? Message-ID: <200911181705.nAIH5uin015873@studio.imagemagick.org> > However, the current way creates rows with odd numbers of bytes Can you post a URL to an example SUN raster ImageMagick fails to read. We will use it to to test any patch we apply to coders/sun.c to fix the problem you reported. Thanks. From ksimek at email.arizona.edu Wed Nov 18 15:42:04 2009 From: ksimek at email.arizona.edu (Kyle Simek) Date: Wed, 18 Nov 2009 16:42:04 -0700 Subject: [magick-developers] possible Sun raster 32-bit bug? In-Reply-To: <200911181705.nAIH5uin015873@studio.imagemagick.org> References: <200911181705.nAIH5uin015873@studio.imagemagick.org> Message-ID: <4B04864C.5010207@email.arizona.edu> Here is an example image: http://vision.cs.arizona.edu/ksimek/temp/fixed32.ras The image was created by taking an image output by ImageMagick and stripping the last byte from every line. I wish I could have generated an example image from scratch using an established imaging library, but ImageMagick is the only library I know that writes 32-bit Sun Raster images. Gimp will read the image above without problem, but IM's display command fails. The link below contains the source image, and C-code I used to convert it to the "fixed" version linked above. http://vision.cs.arizona.edu/ksimek/temp/sun-bug.html Thanks, Kyle Simek duc.sequere.aut.de.via.decede at imagemagick.org wrote: >> However, the current way creates rows with odd numbers of bytes >> > > Can you post a URL to an example SUN raster ImageMagick fails to read. We > will use it to to test any patch we apply to coders/sun.c to fix the problem > you reported. Thanks. > From duc.sequere.aut.de.via.decede at imagemagick.org Wed Nov 18 17:52:19 2009 From: duc.sequere.aut.de.via.decede at imagemagick.org (duc.sequere.aut.de.via.decede at imagemagick.org) Date: Wed, 18 Nov 2009 17:52:19 -0800 Subject: [magick-developers] possible Sun raster 32-bit bug? Message-ID: <200911190152.nAJ1qJfY015430@studio.imagemagick.org> > Here is an example image Thanks. We'll get a patch into the next point release of ImageMagick.