BRT Community

General Category => Discussion - EVE => Topic started by: Cyrilou on February 22, 2024, 11:11:27 AM

Title: How can I get image height and width after cmd_inflate?
Post by: Cyrilou on February 22, 2024, 11:11:27 AM
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?? :-\
Title: Re: How can I get image height and width after cmd_inflate?
Post by: Rudolph on February 29, 2024, 05:21:47 PM
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.
Title: Re: How can I get image height and width after cmd_inflate?
Post by: BRT Community on February 29, 2024, 08:53:30 PM
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