• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Copyrect doesn't work?

Started by pka4916, 19 March 2010, 20:44:57

Previous topic - Next topic

pka4916

I am trying to copy a part of img to img2
but it won't save anything to a file for  img2. 
the file doesn't get written at all.
what am i missing here?

    InitImage(Img);
    InitImage(Img2);
    loadimagefromfile('c:\icon1.png',img);
    imaging.CopyRect(img,0,0,214,200,img2,110,110);

    saveimagetofile('c:\11.png',img2);
    saveimagetofile('c:\12.png',img);

Galfar

Img2 is empty (size 0x0 pixels) so you can't copy anything into it. Use NewImage function before CopyRect.


Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk