Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-06

Write array of byte data to TImage

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Is there any way to write array of bytes to a TImage?

LoadFromStream doesn't appear to work, as it does not contain, AFAIK the bitmap header information that would be stored in a file...

i.e. is there any way to write raw array data to a bitmap or TImage.

Sorry, I haven't worked with images much... I assume the problem could be that load from stream must accept properly formed bitmap file, whereas I may be trying to just write the byte array itself that is not a properly formed bitmap/jpeg/png file with header information or image information.

RawImage.Data (PByte) is read only and cannot be written to AFAICT.

Reply by email