This code (project attached):

  Dim image1 As Image = New Image(128, 128, 0, 0)
  Dim image2 As Image = New Image(128, 128, 0, 0)
  Dim image3 As Image = New Image(128, 128, 0, 0)

  image1.Draw(image2, 0, 0)
  image1.DrawAlpha(image3, 0, 0)

produces the following runtime error:

"The source image and the destination image must have the same format"

The error does not occur when the order of the two draw statements is reversed. The problem still occurs when the images are loaded from file rather than explicitly created. Checking the properties of the two images shows identical results as far as I can tell.

Here's where things get really strange. If I open the property window for image1 (double-click the variable name) and step-execute (F8) the line "image1.Draw(image2, 0, 0)" it raises signal 11.

If I step-execute up to the last line, open the property window for image1, then step-execute the last line the DrawAlpha statement actually works...no error message at all. It's almost like just bringing up the property window modifies image1 such that DrawAlpha under imlib is made happy and doesn't throw the error.

--
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sa...@eightvirtues.com
phone: (770) 853-6271

Attachment: gb3_test.tar.bz2
Description: application/bzip

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to