• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Post reply

Other options

Shortcuts: ALT+S save/post or ALT+P preview

Topic summary

Posted by jus
 - 10 June 2011, 00:58:54
Hi Galfar,

  thank you so much for the prompt reply. I'll try to implement.  :)

Best regards,
jus
Posted by Galfar
 -  8 June 2011, 16:42:35
Hi, it should be quite easy to convert TImageData to CMBitmap:

CMBitmap.image is TImageData.Bits
Width and Height is easy
CMBitmap.pixelSize is 8 * Fmt.BytesPerPixel (use GetImageFormatInfo function to get this)
CMBitmap.rowBytes is Width * CMBitmap.pixelSize

Then you need to set CmBitmap.space according to TImageData.Format,
mostly cmRGB24Space or cmRGBA32Space is used.

Posted by jus2
 -  8 June 2011, 12:07:26
Hi,

  I'm using Lazarus (Mac OSX) and the Vampyre library. I'm trying to find out how to use the colorsync for color conversion with icc profiles.  :'( The mac colorsync API function "CWMatchBitmap" needs CMBitmap. Does Vampyre provides a function for converting TImagingBitmap/TImageData to CMBitmap? if not how can do the conversion to CMBitmap?

The structure/record of CMBitmap is definded in Lazarus as following:
Code (pascal) Select

CMBitmap = record
image: CStringPtr;
width: size_t;
height: size_t;
rowBytes: size_t;
pixelSize: size_t;
space: CMBitmapColorSpace;
user1: UInt32;
user2: UInt32;


Thanks!  :)

jus 

 
SMF spam blocked by CleanTalk