BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: How can I get image height and width after cmd_inflate?  (Read 5790 times)

Cyrilou

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
How can I get image height and width after cmd_inflate?
« 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?? :-\
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 390
    • View Profile
Re: How can I get image height and width after cmd_inflate?
« Reply #1 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.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 741
    • View Profile
Re: How can I get image height and width after cmd_inflate?
« Reply #2 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
Logged