.RAW Conversion; please try on your ImageMagick installation

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We could display your image with this command:
  • display -depth 8 -size 700x700 gray:Mand2.raw
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

For raw images, you must set the depth and size:
  • $image->Set( depth=>8, size=>'700x700');
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

This script work:

Code: Select all

use Image::Magick;

print "Content-type: image/png\r\n\r\n";

$image=Image::Magick->new;
$image->Set( depth=>8, size=>'700x700');
$image->Set(density=>600);
$x = $image->Read('gray:Mand2.raw');
warn $x if $x;
$image->Set(magick=>'png');
binmode STDOUT;
$x = $image->Write('png:-');
warn $x if $x;
Post Reply