PC Review


Reply
Thread Tools Rate Thread

Scaling/resize a GDI+ CImage

 
 
Howie (remove _)
Guest
Posts: n/a
 
      27th Feb 2004
Hi,

i want to resize a image to create a texture to use with OpenGL.
OpenGL needs a size of pover^2.

This is my first try:

CImage texture1;
HRESULT hResult = texture1.Load(texturefilename);
long SizeX = SafeSize(texture_.GetWidth()); //Calculate Power^2
long SizeY = SafeSize(texture_.GetHeight());
CImage texture;
HDC hDC = texture.GetDC();

texture1.StretchBlt(hdc,0,0,SizeX,SizeY,0,0,texture1.GetWidth(),texture1.GetHeight());

But texture.GetWidth() ist alway 0;

Where is my fault ?


Thanks,

Howie

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hi, how to read bits from CImage class Baby Lion Microsoft Dot NET 0 7th Jun 2008 05:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:05 PM.