Re: [magick-users] GraphicsMagick 1.0 Released
Bob Friesenhahn <[email protected]> Wed, 7 May 2003 09:15:10 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the heads-up on the Transparent(color => 'cyan') problem. we will take a look. The problem could be in the PNG coder, or perhaps I broke something somewhere in the transparency code. Bob On Wed, 7 May 2003, Ron Savage wrote: > On Tue, 6 May 2003 00:00:07 -0500 (CDT), Bob Friesenhahn wrote: > > Hi Folks > > >We are happy to announce the release of GraphicsMagick 1.0. It has > > I've run a series of tests on this package, under Win2K: > 1) Virtually everything I've tested works. Excellent > 2) The install/help/somewhere mentions Image::Magick in 1 place. > Minor > 3) gmdisplay will not reload a file which has been changed. I assume > it's only checking the file name, and not the file's other > attributes. Minor > 4) gmdisplay defaults to *.JPG. Would it be possible to default to > *.*, or *.PNG? Minor > 5) I can't get $image -> Transparent(color => 'cyan') to work. I take > this to mean anything drawn in cyan should be transparent, ie have > the bkg showing thru. A bit worse than minor. > Output from identify: > -----><8----- > C:\Apache2\htdocs\gm>gm identify -verbose im-hax-transparent-1.png > Image: im-hax-transparent-1.png > Format: PNG (Portable Network Graphics) > Geometry: 304x74 > Class: DirectClass > Type: palette with transparency (<- Close, but no cigar) > Depth: 8 bits-per-pixel component > Colors: 2 > > 19309: ( 0,128, 0, 0) green > 3187: ( 0,255,255, 0) aqua > Filesize: 951.0 > Interlace: None > Background Color: green > Border Color: #DFDFDF00 > Matte Color: grey74 > Dispose: Undefined > Iterations: 0 > Compression: Zip > signature: > f7df2b8d1e8090a5607a11cc1c03a04909370f51c95293064b22086e1ccbfaaa > Tainted: False > User Time: 0.010u > Elapsed Time: 0:01 > -----><8----- > Q: Which color, exactly, is transparent? > The code: > -----><8----- > #!/usr/bin/perl > # > # Name: > # im-hax-transparent-1.pl. > # > # Purpose: > # Demonstrate the Transparent method. > # > # V 1.03 06-May-2003 > # ------------------ > # o Convert to GraphicsMagick V 1.0 Q8 > # > # V 1.02 20-Jun-2002 > # ------------------ > # o Output to current directory > # o Use stroke => 'none', not '#000000'. > # You should try both, and other colors too. > # > # V 1.01 20-Feb-2002 > # ------------------ > # o Output to same dir as other hax > # o Put a border round the image > # > # V 1.00 1-Oct-2001 > # ----------------- > # o Initial version > # > # Test environment: > # OS: Win2K > # Web server: Apache V 2.0.43 > # GM: V 1.0 > # > # Input files: > # Generic.ttf > # > # Output files: > # im-hax-transparent-1.gif > # > # Note: > # o tab = 4 spaces || die. > # o Text reformatted to max 50 chars wide > # so source can be converted to PDF > # > # Author: > # Ron Savage <[email protected]> > # http://savage.net.au/ImageMagick.html > # > # Licence: > # Copyright (c) 1999-2003 Ron Savage > # > # All Programs of mine are > # 'OSI Certified Open Source Software'; > # you can redistribute them and/or modify them > # under the terms of the Artistic License, > # a copy of which is available at: > # http://www.opensource.org/licenses/index.html > > use strict; > use warnings; > > use Graphics::Magick; > > # ----------------------------------------------- > > my($im_version) = $Graphics::Magick::VERSION; > print "Graphics::Magick V $im_version. \n"; > > my($work_dir_name) = '/apache2/htdocs/gm'; > > chdir($work_dir_name) > || die("Can't chdir($work_dir_name): $!"); > > print "Work directory: $work_dir_name. \n"; > > my($output_file_name) = > 'im-hax-transparent-1.png'; > my($image) = > Graphics::Magick -> new(size => '300x70'); > # Try 'xc:black' or 'gradation:black-black'. > my($result) = > $image -> Read('xc:green'); > warn $result if $result; > > $result = > $image -> Transparent(color => 'cyan'); > warn $result if $result; > > # stroke => 'none', fill => 'cyan' produces > # sharper text than stroke => 'black', > # fill => 'cyan'. > > $result = $image -> Annotate > ( > text => 'Transparent', > x => 10, > y => 50, > stroke => 'none', > font => 'Generic.ttf', > pointsize => 40, > fill => 'cyan', > antialias => 'false', > ); > warn $result if $result; > > $result = $image -> Border > ( > width => 2, > height => 2, > fill => 'cyan', > ); > warn $result if $result; > > $result = $image -> Write($output_file_name); > warn $result if $result; > print "Success. Wrote $output_file_name. \n"; > -----><8----- > > > -- > Cheers > Ron Savage, [email protected] on 07/05/2003 > http://savage.net.au/index.html > > > > _______________________________________________ > Magick-users mailing list > [email protected] > http://studio.imagemagick.org/mailman/listinfo/magick-users > ====================================== Bob Friesenhahn [email protected] http://www.simplesystems.org/users/bfriesen ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com