Search found 5 matches

by jogchum
2020-02-10T04:50:25-07:00
Forum: Users
Topic: Converting grayscale ppm to png or jpg gives only black and white
Replies: 10
Views: 2127

Re: Converting grayscale ppm to png or jpg gives only black and white

Changing maxval from 256 to 65535 makes convert do the job, indeed, thanks! But is still odd that both Gwenview and Gimp are able to create good jpg's or png's from the original ppm-files.
by jogchum
2020-02-09T14:19:43-07:00
Forum: Users
Topic: Converting grayscale ppm to png or jpg gives only black and white
Replies: 10
Views: 2127

Re: Converting grayscale ppm to png or jpg gives only black and white

Hmm, I create the file myself, in c, according to the ppm format for 16bit samples, three samples per pixel. GwenView renders the file fine, and converts it correct to either jpg or png. But does this on a file-by-file base, so converting 1000 of them is rather cumbersome... What is the command you ...
by jogchum
2020-02-09T13:42:33-07:00
Forum: Users
Topic: Converting grayscale ppm to png or jpg gives only black and white
Replies: 10
Views: 2127

Re: Converting grayscale ppm to png or jpg gives only black and white

The command is
convert -depth 16 -colorspace gray -compress none "pvar-1.500000.ppm" "pvar-1.500000.jpg"

I'll try an find a hosting service to upload the files to.
by jogchum
2020-02-09T13:20:51-07:00
Forum: Users
Topic: Converting grayscale ppm to png or jpg gives only black and white
Replies: 10
Views: 2127

Converting grayscale ppm to png or jpg gives only black and white

I have some 1000 grayscale (mandelbrot) files in .ppm-format, which I want to convert to png or jpg. But convert leaves out all the gray, writing only black and white to the .png. (or jpg). I used "-colorspace gray", "-compress none" and "-depth 16" arguments, but the result is always the same. I'm ...