Board index » delphi » How can I convert bitmap to rgb (urgent)
Rafael Cotta
![]() Delphi Developer |
Wed, 09 Feb 2005 04:45:51 GMT
|
Rafael Cotta
![]() Delphi Developer |
Wed, 09 Feb 2005 04:45:51 GMT
How can I convert bitmap to rgb (urgent)
Sorry for this a bit off-topic post, but I do need to generate a rgb file
from a bitmap. Is there any freeware that does this job? Rafael |
Tomaz Koritni
![]() Delphi Developer |
Wed, 09 Feb 2005 06:22:52 GMT
Re:How can I convert bitmap to rgb (urgent)Hi If you have 24 or 32 bit bitmap then just go through scanlines and save Tomaz Quote"Rafael Cotta" <rcotta.nos...@ig.com.br> wrote in message Quote> Sorry for this a bit off-topic post, but I do need to generate a rgb file |
Rafael Cott
![]() Delphi Developer |
Wed, 09 Feb 2005 08:23:03 GMT
Re:How can I convert bitmap to rgb (urgent)I think that's not enough. There are some header information. http://astronomy.swin.edu.au/~pbourke/dataformats/sgirgb/ Rafael "Tomaz Koritnik" <tomaz.koritn...@guest.arnes.si> escreveu na mensagem Quote> Hi |
RandomAcces
![]() Delphi Developer |
Wed, 09 Feb 2005 13:52:09 GMT
Re:How can I convert bitmap to rgb (urgent)Quote"Rafael Cotta" <rcotta.nos...@ig.com.br> wrote in message Quote> I think that's not enough. There are some header information. Bitmap.SaveToFile(FileName); Will create 24Bit RGB encoded DIB. PixelFormat := pf32Bit, is the same but has extra byte per pixel (RGBA) Regards |
RandomAcces
![]() Delphi Developer |
Wed, 09 Feb 2005 13:55:43 GMT
Re:How can I convert bitmap to rgb (urgent)If on the other hand, you are talking about saving raw 24bit pixel data then the header needs only to contain Width and height of bitmap so you can correctly decode scanline boundaries. TFileStream should be perfect for doing this. Regards |
Nils Haec
![]() Delphi Developer |
Fri, 18 Feb 2005 09:00:12 GMT
Re:How can I convert bitmap to rgb (urgent)Hi Rafael, Just take this info: 2 bytes short MAGIC IRIS image file magic number And make it into a record, like this (please check the length to see if it type Then, create your file like this procedure SaveBitmapAsSgiRgbFile(ABitmap: TBitmap, AFileName: string); // Save image finally Hope this helps, just wrote it down, no guarantees :) Nils QuoteRafael Cotta <rcotta.nos...@ig.com.br> wrote in message Quote> I think that's not enough. There are some header information. |
1. Convert a Bitmap into a Black-And-White-Bitmap
2. Convert 1-bit b&w bitmap to grayscale bitmap
3. Converting wavelength of light to RGB triple...
6. Extract a channel (rgb) from a true color bitmap
7. Fast way to modify hue, sat, lum of RGB bitmap
8. Converting RGB to b&w/grayscale?
9. Convert RGB from one color temperature to another
10. Convert/Approximate RGB Colors to standard AutoCad Colors