Page 1 of 1

Help convert raw .RW2 image

Posted: 2015-02-22T23:29:17-07:00
by dedalus
Hi,

I was trying to get a jpg or png converting a .RW2 file (Panasonic Lumix raw format).

If I run

Code: Select all

dcraw -w -c image.RW2 | convert - -resize 366x275 image.jpg
it works, not so if I run

Code: Select all

convert -depth 16 -size 366x275 rgb:image.RW2 image.jpg
.

I tried different -depth and also gray:image.RW2, output image.jpg and image.png … but I always get a bunch of files named image_0.png, image_1.pngimage_N.png (up to 64 files…!) and then the message:

Code: Select all

convert: unexpected end-of-file `image.RW2': No such file or directory @ error/gray.c/ReadGRAYImage/216.
or

Code: Select all

convert: unexpected end-of-file `image.RW2': No such file or directory @ error/rgb.c/ReadRGBImage/237.
Is there something to check? Running

Code: Select all

brew info imagemagick
I have:

Code: Select all

imagemagick: stable 6.9.0-3 (bottled), HEAD
http://www.imagemagick.org
/usr/local/Cellar/imagemagick/6.9.0-3 (1448 files, 23M) *
  Built from source with: --with-ghostscript, --with-libtiff, --with-webp, --with-librsvg, --with-fontconfig, --with-jp2
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/imagemagick.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Required: libtool ✔, xz ✔
Recommended: jpeg ✔, libpng ✔, freetype ✔
Optional: fontconfig ✔, libtiff ✔, little-cms ✔, little-cms2 ✔, libwmf ✘, librsvg ✔, liblqr ✘, openexr ✘, ghostscript ✔, webp ✔, fftw ✘
Thanks

Re: Help convert raw .RW2 image

Posted: 2015-02-23T00:54:27-07:00
by snibgo
Why the "rgb:" prefix? This tells IM to ignore the filetype (RW2) and parse it as something else. Try without "rgb:".

Re: Help convert raw .RW2 image

Posted: 2015-02-23T07:51:41-07:00
by dedalus
:shock: ehm … that's true, thanks a lot. I was sure I had to prefix rgb: and I didn't try without.