Prashant Saxena on  wrote...
| Hello,
|       I have an image (gif file) having geometry 36x36.    
| I scaled this image to 18x18. When I viewed the scaled file in browser the 
image appeard to be smaller as expected. But the number of bytes (as shown by 
ls -l command) increased for the new scaled down file. How is this possible?
| 
| Following are outputs of unix "file" and "ls -l" command on both files.
| 
| ls -l in.gif
| -rw-rw-r--  1 prashant users 868 Jun  7 14:15 in.gif
| 
| file in.gif
| in.gif: GIF image data, version 89a, 36 x 36
| 
| 
| ls -l out.gif
| -rw-rw-r--  1 prashant users 1078 Jun  7 14:15 out.gif
| 
| file out.gif
| out.gif: GIF image data, version 89a, 18 x 18
| 
| You can notice that size (on disk) of original file is 868 bytes but that of 
new scaled down file is 1078 bytes. This seems confusing to me.
| 

You did not mention the actual IM command used!

More than likely your actual image is 36x36 but it is on a larger
canvas.

Check what  identify  reports for that image!

It will probably look something like....
   crop.gif GIF 40x30 70x46+10+10 PseudoClass 256c 2.1kb 

This image is 40x30, but is on a later 70x46 canvas!
Resize reszies a canvas, NOT the image.

To fix try...
   convert in.gif +repage -scale 18x18  out.gif



  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
 DISCLAIMER - These opoi^H^H "damn", ^H, [esc :q :qq !q "shit!" :Q!  "Whaddya
 mean, Not an editor command?" :wq! ^C^C^C !STOP ^bye ^quit :quit! !halt ...
 ^w^q :!w :wq! ^D :qq!! ^STOP [HALT!   HALT!!! "Why's it doing this?" :stopit!
 :wwqq!! ^Z ^L ^ESC STOP  :bye  bye  bye! "Hey, what's this red button d..."
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to