OT stuck with power of 2 DDS file?

Rory Cooper wrote on 3/3/2011, 3:18 AM
Can anyone help me with this.

I need to use file sizes equal to the power of 2 “2,4,6,8,16,32, with an ap to generate a DirectDraw Surface

How would I be able to work out an image say 4000x2000 pixels, what and how do I convert that size=equal to the power of 2?

Try and keep it simple my head hurts, thanks guys.

Comments

farss wrote on 3/3/2011, 3:33 AM
Do you mean the file size or the image resolution?
If the latter then just find the power of two greater than 4K and same for 2K which is 4096 x 2048.

Hope you feel better now.

Bob.
Rory Cooper wrote on 3/3/2011, 3:54 AM
Much better now thanks Bob ……..it worked

The pain has gone but the confusion normally lingers a lot longer, weeks if not months.
JohnnyRoy wrote on 3/3/2011, 6:44 AM
> The pain has gone but the confusion normally lingers a lot longer, weeks if not months.

lol... so when we were sitting in Math class staring out the window and wondering, "When am I ever going to use all this useless junk?"

...the correct answer was: Video Editing (hahaha)

~jr
rs170a wrote on 3/3/2011, 6:56 AM
Give him a break John.
That was back in grade 5 or 6 - i.e. a long (or in my case, very long) time ago :)

Mike
JohnnyRoy wrote on 3/3/2011, 7:40 AM
> "Give him a break John."

Yea, i was just goshin'... when I teach a video workshop and get to talking about aspect ratios and angles for lighting, a light bulb goes off in the students heads that, "maybe there is a use for all this math stuff after all".

Math... not just for Rocket Scientists!

I blame the school system for teaching you things without first telling you why you need to know it. If they challenged you with a real world problem and then showed you the formula to solve it, I bet a lot more kids would remember it. (rather than teaching you a formula with absolutely no context)... But I digress...

~jr
rs170a wrote on 3/3/2011, 8:07 AM
Yea, i was just goshin'...

Don't worry. I knew you were.

I blame the school system for teaching you things without first telling you why you need to know it.

I agree 110% , even at the college where I work.
When I'm trying to explain something that I know is initially going to be over everyone's head, I do my best to find real world examples that I can compare it to.
For example, I compare what a TBC does to a cruise control on a car.
Greatly oversimplifying things but it helps them to understand the basics of what's going on before I get into the nitty gritty of things.

Mike
musicvid10 wrote on 3/3/2011, 10:18 AM
"...the correct answer was: Video Editing (hahaha)"

Not as funny as it sounds. I regularly use screen aspect examples when teaching ratios, proportions, and similarities. It's something they can all relate to, and you should see the eyes widen; "Ah, so that's what 4:3 and 16:9 really mean!"
Rory Cooper wrote on 3/3/2011, 10:04 PM
Math is derived from the root word aftermath…… causes havoc and ruins your day.

When it came to technical drawing and angles and ratio’s like 1:0.618 no problem. so it’s just as you said JR when you see the application it’s much easier to comprehend.

Once again thanks to the Bof’s on this forum.
FilmingPhotoGuy wrote on 3/3/2011, 11:33 PM
I thought the math was to help us count ALL the money we were suppose to make.
rs170a wrote on 3/4/2011, 2:16 AM
We failed math so I guess that's why we never made the money we thought we would :)

Mike