Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - SetBitmapDimensionEx | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 7065/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 09-14-05 07:48 AM Link | Quote
This function is supposed to set the dimensions of a bitmap... 2 problems. One, it wants ".01-mm units"... everything I've worked with so far uses pixels and I don't know of any functions to convert them to this obscure unit. Two, it doesn't work. I resize the bitmap but it's still the same size it was created at, even though it returns OK. (And who's the genuis who left the 's' off 'dimensons' and made it not set the last error code if something does go wrong? )


(edited by HyperHacker on 09-13-05 10:49 PM)
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 248/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 09-14-05 08:54 AM Link | Quote
I think that bitmaps can have dimensions in real world units independent of the size in pixels. This function, in effect, sets the conversion between pixels and .01mm units for the specified bitmap.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 7074/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 09-14-05 09:16 AM Link | Quote
Yeah, but I'm working with pixels. How do I convert a pixel size to a .01-mm size?
sloat

Level: 16

Posts: 80/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 09-14-05 09:19 AM Link | Quote
Actually that function doesn't actually change the dimensions of a GDI bitmap. I know it seems stupid, and it is, but that's GDI for you. If you read the second sentence, you'll see: "These dimensions can be used by applications; however, they are not used by the system."

So really, the Get/SetBitmapDimension functions aren't very useful. And they also can't be used on a DIB.

The only way to "resize" a memory bitmap is to create a new one with the dimensions you want, copy the bitmap over, and delete the old one. It's not as slow as you'd think, but it's the only way to do it.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 7076/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 09-14-05 07:37 PM Link | Quote
Eh, I figured that's how I'd have to do it anyway. Do I need to re-assign it to the hDC and all that too?
sloat

Level: 16

Posts: 81/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 09-16-05 12:02 AM Link | Quote
Yeah. Just make sure you delete the old bitmap after you select the new one to the DC.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - SetBitmapDimensionEx | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.024 seconds.