Menu

#382 Resampling Image with disabled alpha channel is not working

v1.0_(example)
closed-works-for-me
None
5
2017-03-04
2016-04-14
No

Hi,

I am using below command on attached image (production_small.tif).

gm convert -density 300 production_small.tif -resample 72 -density 72 -clip output-small.tif

Due to the -resample attribute the image generated(output-small.tif) is not looking good.

I am using GraphicsMagick @1.3.23_1+q8.

It looks like a bug in GM according to me But please let me know if I am missing something.

Thanks
Shreshth

2 Attachments

Discussion

  • Bob Friesenhahn

    Bob Friesenhahn - 2017-03-04
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-03-04

    What is not looking good? The reduced image looks pretty good to me when viewing pixel-for-pixel.

    Your input TIFF file has a resolution of 300x300 pixels/inch, which matches your density argument. For future reference, it may be necessary to specify -density after the filename if the file itself contains resolution.

    The output resolution is only 72 pixels/inch which is less than many computer screens offer now (it is equivalent to the original Apple Mac computer display resolution).

    What may be happening is that your viewer is showing the image at a larger size than it should. The scaled image only has 120x85 pixels which means that it would be shown 1.7 inches wide on a screen with 72 pixels/inch.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-03-04

    I notice that the title of this bug report says "with disabled alpha channel" but the command line you used did not disable the alpha channel. Use +matte after the input file name to disable the alpha channel.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2017-03-04
    • status: open --> closed-works-for-me
     

Log in to post a comment.

MongoDB Logo MongoDB