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?".
Right now I have a bunch of .bsv files that contain color image data. Right now, to get the end result of color pngs, I am importing each .bsv as a raw 8-bit in imagej with little-endian byte order. This creates 40 8-bit grayscale images which I can save as .tif. Then I've been using imagemagick and mogrify to change the format of the .tif's to .pgm. Then I give all of those .pgm to this Debayer program: http://www.fastcompression.com/products ... ebayer.htm
using this loop:
ImageMagick can import raw. IM delegates Bayer processing to dcraw. Alternatively dcraw can be used directly as a first step, and IM used for later steps. http://www.imagemagick.org/Usage/formats/#crw
yes, there is a header file, and the reason I suspect that dcraw might be able to handle it is because I can open it in imagej with Import->raw.
The header file is quite large, and has a ton of metrics, but I'm not sure what most of them mean. Imagej asks for Image Type: (8-bit), Width: (4000 pixels), Height: (2672 pixels), Offset to first image: (0 bytes), Number of images: (40), Gap between images: (0 bytes), and then I check the box that says "little-endian byte order". But the header has values for tons of other things.
The reason I'm trying to use IM is because I'm attempting to create a .bat file. I have a ton of these .bsv files, and clicking and importing and saving each one with imagej is tedious. If I can figure out how to do it in imagemagick, then I can write a few lines of command line. I don't need to do the debayering with imagemagick, I have a command-line gpu program that will debayer them.
snibgo wrote:
IM can read binary files that contain uncompressed pixel data. But it can't skip over a header and trailer; you would need to do that outside IM.
Read up on the "-size" option:
use -size with an offset to skip any header information in the image
That won't work, of course, if you need to actually interpret the header and use the
information from it to decode the image.