corrupt image when using -gaussian with PNM files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Post by RetroJ »

I was able to reproduce this bug on http://jjfoerch.com/bitbucket/cookie.jpg

This works fine:

Code: Select all

convert cookie.jpg new.pnm
This produces a corrupt image:

Code: Select all

convert cookie.jpg -gaussian 1x1 new-blurred.pnm
Using Imagemagick 6.3.1 01/10/07 Q16 on Debian.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

A 16-bit PNM is valid. However, kview and gimp may not support anything beyond 8-bits. Try this command:
  • convert original.pnm -gaussian 1x1 -depth 8 result.pnm
to create an 8-bit PNM image.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

technically the depth for all but bitmap NetPBM images formats (whcih includes PNM whcih is a suffix fro ANY NetPBM format without being specific) can use any maximum value from 1 to what ever your INT maximum is for your machine!

I myself use some very odd depths when using the format to create specific images.
For examples see Resized gradients...
http://www.cit.gu.edu.au/~anthony/graph ... ent_resize
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Post by RetroJ »

Very interesting. Nice to see that ImageMagick is not at fault here, and indeed, has a feature that those other programs lack.
Post Reply