> i still get the same error.

Do you have a compiler?  Try this sanity check.  Create this file, gradient.c:

  #include <stdio.h>
  #define NumberPixels  (200*200)
  
  main()
  {
    int i;
    for (i=0; i < NumberPixels; i++)
    {
      float pixel = i/(float) NumberPixels;
      fwrite(&pixel,sizeof(float),1,stdout);
    }
  }
  
Compile like this

  cc gradient.c
  a.out > rawimage

Now convert:

  convert -define quantum:format=floating-point -depth 32 -size 200x200 \
    gray:rawimage image.png

If all goes well you will see gradient when you display the image.  The
image attributes include:

  -> identify -verbose image.png 
  Image: image.png
    Format: PNG (Portable Network Graphics)
    Class: PseudoClass
    Geometry: 200x200+0+0
    Resolution: 72x72
    Print size: 2.77778x2.77778
    Units: Undefined
    Type: Grayscale
    Base type: Grayscale
    Endianess: Undefined
    Colorspace: RGB
    Depth: 16-bit
    Channel depth:
      gray: 16-bit
    Channel statistics:
      gray:
        min: 0 (0)
        max: 65533 (0.999969)
        mean: 32766.7 (0.499988)
        standard deviation: 18918.3 (0.288675)
        kurtosis: -1.2
        skewness: -1.61271e-08
  ...

Hopefully this works for you which proves ImageMagick is properly reading
a float raw image.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to