Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with ending program
#11
You have a picture of a certain width and height.

So the picture consists of an amount of pixels:
Code:
pixels = width * height
Each pixel takes up 3 or 4 bytes of memory, depending on your color depth (let's assume 32 bit here, so 4 bytes per pixel). Amount of space total for all pixels is:
Code:
spaceforpixels = pixels * 4
               = width * height * 4
However, the PUT format uses a 4 byte header to store the width and height of your image in. So the total required size becomes:
Code:
totalsize = spaceforpixels + 4
          = width * height * 4 + 4
Note that this is in bytes the required size of your array.

Smile
Reply
#12
Does that mean...
...

Say, how many bytes are an fB integer? Smile
/post]
Reply
#13
4 Wink or 32 bit...

For Windows that is
Reply
#14
Hay... now that whole BLOAD thing make since.... Width times hight times 4 for total bites plus 4 for the header..... :roll: :lol:

:wink: Thanks, Neo.... even tho I didn't ask..
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)