Conversion RGB to Other format

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
dudyalas

Conversion RGB to Other format

Post by dudyalas »

How do I convert 32 bit RGB (BMP or JPG) images to any these types A1R5G5B5,1-bit monochrome, R5G6B5 YUY2 UYVY, X8R8G8B8 images.
I need a command line utility preferably similar to "convert" or using convert itself
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Conversion RGB to Other format

Post by Bonzo »

If your format is supported try:

Code: Select all

convert image_in.jpg -colorspace RGB image_out.jpg
http://www.imagemagick.org/script/comma ... colorspace
dudyalas

Re: Conversion RGB to Other format

Post by dudyalas »

to be more specific I want to convert 32 bit RGB Image to Standard
16 bit A1 R5 G5 B5
1-bit monochrome etc.
Or I need a method to get R component G component & B component of a image separately.
How to combine raw data to form a image
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Conversion RGB to Other format

Post by anthony »

I think the bigger question here is... What image format supports these color spaces?
If this is handled by special color profiles, then you need to do a color profile conversion.
Otherwise you may have to save the converted image in a raw format such as the IM Pixel enumerated text format ".txt"
http://www.imagemagick.org/Usage/files/#txt
or perhaps a NetPBM image format
http://www.imagemagick.org/Usage/formats/#netpbm
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply