components/imagemagick/TESTING
branchs11u3-sru
changeset 7644 b5a859411118
parent 7538 1668450ff96c
equal deleted inserted replaced
7643:eece4b285510 7644:b5a859411118
    56     -fill lavender -tint 100 \) \
    56     -fill lavender -tint 100 \) \
    57     +swap -composite logo_3D_bg.jpg
    57     +swap -composite logo_3D_bg.jpg
    58 
    58 
    59 # Now compare logo_3D_bg.jpg to the image at
    59 # Now compare logo_3D_bg.jpg to the image at
    60 # http://www.imagemagick.org/Usage/advanced/#3d-logos
    60 # http://www.imagemagick.org/Usage/advanced/#3d-logos
       
    61 
       
    62 
       
    63 cat > a.pl <<'EOT'
       
    64 #!/usr/bin/perl
       
    65 
       
    66 use Image::Magick;
       
    67 
       
    68 $image=Image::Magick->new;
       
    69 $image->Set(size=>'300x300');
       
    70 $image->Read('xc:white');
       
    71 
       
    72 $tile=Image::Magick->new;
       
    73 $tile->Read('tile.gif');
       
    74 $image->Draw(primitive=>'Polygon',tile=>$tile,fill=>'none',
       
    75   points=>'30,30 100,10 190,290 30,290');
       
    76 $image->Draw(stroke=>'red',primitive=>'Ellipse',stroke=>'black',fill=>'red',
       
    77   strokewidth=>5,points=>'100,100 50,75 0,360');
       
    78 $image->Draw(primitive=>'Polygon',fill=>'none',stroke=>'black',strokewidth=>5,
       
    79   points=>'30,30 100,10 190,290 30,290');
       
    80 $image->FloodfillPaint(geometry=>'+132+62',fill=>'blue',bordercolor=>'black',
       
    81   invert=>'true');
       
    82 
       
    83 $image->Annotate(fill=>'red',geometry=>'+280+120',font=>'Generic.ttf',
       
    84   pointsize=>14,text=>''.localtime(),rotate=>90.0);
       
    85 
       
    86 $image->Write('shapes.gif');
       
    87 EOT
       
    88 
       
    89 chmod +x a.pl
       
    90 ./a.pl
       
    91 
       
    92 # Now display 'shapes.gif' and make sure it contains current date
       
    93 
       
    94 
       
    95 # Emacs is using imagemagick - let's test it
       
    96 
       
    97 pkg install gnu-emacs-x11 gnu-emacs-gtk
       
    98 cd /usr/share/doc/ImageMagick-6/images
       
    99 
       
   100 # We need to convert to bmp, because other file types (like png) emacs opens
       
   101 # directly via libpng and not using ImageMagick's libWand
       
   102 convert wizard.png wizard.bmp
       
   103 
       
   104 # Now both emacs should be able to display image
       
   105 
       
   106 emacs-x wizard.bmp
       
   107 emacs-gtk wizard.bmp