Monthly Archives: September 2006

The bitmap resolution can be also very easily changed with gdi+.

The sample below uses the new GdiPlus-X classes from VFPX projects that can be downloaded from here: http://www.codeplex.com/wiki/view.aspx?projectname=vfpx&title=gdiplusx

** how to change the bitmap resolution

* the code loads an image, changes its resolution to 200x200
* and saves it again as a bmp
*
http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.setresolution.aspx

do locfile("system.app")

with _screen.system.drawing
   * load image to gdi+
   local lobmp as xfcbitmap
   lobmp = .bitmap.new(getpict())

   * change bitmapresolution
   lobmp.setresolution(200,200)

   *… Continue reading

As a continuation of my article from may 2006 published in UTMAG, entitled "Multiframe images with Gdi+" i wrote a new article published in the september 2006 issue of utmag called "Using TIFFs with the new Gdi+ classes" showing how to manipulate TIFF images using the new gdiplus-x library from VFP-X project. It also shows how to create TIFFs using all compressions supported.

But I left one point not very clear. This came to me after I saw a question from Jennifer Slusher in the universal thread… Continue reading

Here's another very simple code that attends Bernard Bout, creating an image on the fly, based on his post entitled "Using the alpha channel in visual foxpro images". Again in this sample, I'm using the new gdiplus-x classes from vfp-x project that can be downloaded from here: http://www.codeplex.com/wiki/view.aspx?projectname=vfpx&title=gdiplusx

Hope this helps Bernard !

Target image: mainform.png

* Helper code to create image on the fly for
* bernard bout "Using the alpha channel in VFP images"
*
http://weblogs.foxite.com/bernardbout/archive/2006/09/11/2436.aspx
*    image dimensions 300 x 270 pixels
*    make all image totally transparent
*    draw a light yellow - rgb(254,254,228)… Continue reading