|
-
Jun 11th, 2001, 03:47 PM
#1
Thread Starter
Addicted Member
Rescaling bitmaps
Here's my question. How do you rescale bitmaps?
...and I don't mean using the PaintPicture or StretchBlt API.
e.g. I created a bitmap (used for memory DC) whose size is 320 x 240 pixels. Now how can I rescale (resize, expand...call it whatever you like) it to, for eg., 640 x 480 pixels?
The only solution I've come around so far is to create a new bitmap and delete the old one... but I know there has to be another way.
-
Jun 11th, 2001, 03:57 PM
#2
Good Ol' Platypus
If you want not to lose quality then you can go to
http://vbden.tripod.com/download.htm
Where I have made my own enhancer for gfx...
And I have a DLL version on the go (uses DDraw) that you can use at runtime...
just email me
[email protected]
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jun 11th, 2001, 04:13 PM
#3
Thread Starter
Addicted Member
Actually, the bitmap is empty (created with the CreateCompatibleBitmap API).
Hm, just realized I've used the wrong word for the title 
I need to change the bitmap's width/height. You know, exactly the same as when you change the height/width properties of a PictureBox and the "drawing area" expands...
-
Jun 11th, 2001, 04:18 PM
#4
Good Ol' Platypus
Then why don't you do that?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jun 11th, 2001, 04:31 PM
#5
Thread Starter
Addicted Member
The reason is simple. I can't 
I tried using the SetBitmapDimensionEx API but the system doesn't use these dimensions when blitting onto a DC. And as for the PixtureBox, I'm trying to use as less controls as possible...
-
Jun 11th, 2001, 04:39 PM
#6
transcendental analytic
Youre so right, you can't, simply because a a bitmap is a bit-map, a singledimensioned array of bits. What you have to do is create a new bitmap and blit over.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 11th, 2001, 04:47 PM
#7
Thread Starter
Addicted Member
-
Jun 11th, 2001, 05:02 PM
#8
Good Ol' Platypus
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jun 14th, 2001, 03:49 PM
#9
Thread Starter
Addicted Member
I'm creating a program for designing labels, covers, etc.
-
Jun 14th, 2001, 03:56 PM
#10
Good Ol' Platypus
In my DLL I'll have some easy-DX stuff, allowing you do change pixels on a DDraw(DX7) surface using a LONG array of x,y, instead of what DD gives you....
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|