General Category > Discussion - EVE

How can I get image height and width after cmd_inflate?

(1/1)

Cyrilou:
Hi?

I written in EVE flash blob file, map file and a zlib image that can be variable.

I inflate image in RAM_G, but when I use CMD_SETBITMAP to display it, I must know Height and Width properties that can be variables.

How can I get this properties, since CMD_GETPROPS doesn't work on  CMD_INFLATE but on CMD_LOADIMAGE?? :-\

Rudolph:
CMD_INFLATE "only" unpacks data so the only information you can get additionally is the end address using CMD_GETPTR and therefore you could calculate the size of the uncompressed file.
So what you could do is to add extra information in front or after the data before compressing it.

BRT Community:
Hi,
Yes, unlike the compressed png/jpg formats, the compressed file for an inflate could have different types of content and so there will not be standard image data in all cases. As Rudolph mentioned, since you will create the file in most cases, you can include our own header containing the details before compressing, and then when using it in EVE, you can parse that after inflating it (and then exclude that header data when you display the resulting raw image in EVE).

Best Regards, BRT Community

Navigation

[0] Message Index

Go to full version