Hi,
I generate a file with 200*100 "pixels" written as follow (in C) :
/* red */
float red = 1.0f;
fwrite (&red, sizeof(float), 1, file);
/* same for green and blue */
I'd like to display the file but I just get a black picture.
Say the file is named rbg.out, I use the following command :
display -size 200x100 -depth 32 -define quantum:format=floating-point rgb:out.rgb
I use ImageMagick 6.4.3.
What's wrong ?
Thanks a lot.
How to display raw rgb 32 bits floating-point images ?
Re: How to display raw rgb 32 bits floating-point images ?
Try this command:
- display -size 200x100 -depth 32 -define quantum:format=floating-point -define quantum:scale=65536.0 -endian lsb out.rgb
Re: How to display raw rgb 32 bits floating-point images ?
It works, thanks a lot!
But, I don't find the documentation for quantum:scale or -endian on imagemagick.org,
where is it ?
Thank you again.
But, I don't find the documentation for quantum:scale or -endian on imagemagick.org,
where is it ?
Thank you again.
Re: How to display raw rgb 32 bits floating-point images ?
The command line we provided is a temporary fix. You should not need quantum:scale or -endian in your command line and we have applied a patch to ImageMagick to fix the problem for the next release.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: How to display raw rgb 32 bits floating-point images ?
@magick: should the scale be 65536 or 65535?
and for a Q8 IM, should it be 255.0 or 256.0?
Pete
and for a Q8 IM, should it be 255.0 or 256.0?
Pete
Re: How to display raw rgb 32 bits floating-point images ?
Right. 255 for Q8, 65535 for Q16. However, the latest Subversion trunk patch removes the need to specify the scale.