Monthly Archives: June 2007

i've just posted a new version of the gradobjects class.

thanks to nigel for reporting a bug that occured when using graphical optiongroups.

here's the updated version.

http://weblogs.foxite.com/files/vfpimaging/gradobjects/gradobjects.zip

more info can be obtained at the original post:

gradient objects with gdi+

http://weblogs.foxite.com/vfpimaging/archive/2006/07/26/2076.aspx

this one goes to koen piller

i've seen in many forums people asking about the possibility to open the getpict() dialog showing thumbnails instead of picture file names.

just for fun, i did some tests simulating some keystrokes, and it works ! save the 3 lines below in a prg and run under winxp:

   oshell = createobject("wscript.shell")
   oshell.sendkeys("{tab}{tab}{tab}{tab}{tab}{down}{down}{down}{down}{enter}")
   getpict()

as you can see, i used the sendkeys function from wsh. at this link you can find all key codes, if you want to use this technique for any other purpose: http://msdn2.microsoft.com/en-us/library/system.windows.forms.sendkeys(vs.71).aspx

this was tested only… Continue reading

blurring images is also very easy.

the simplest technique is to resize the original image to a much smaller size, and then resize it to the original size.

the reason is very obvious, when we enhance the dimensions of any image we have a loss of quality, causing the blur effect.

 
important
requires vfp9 and gdiplusx to run. 
please make sure that you have the latest version!
http://www.codeplex.com/vfpx/wiki/view.aspx?title=gdiplusx&referringtitle=home

 

* init gdiplusx
do locfile("system.app")

with _screen.system.drawing

* load source image
local lobmp as xfcbitmap
lobmp = .
bitmap.new(getpict())

* get a rectangle… Continue reading

some people have been asking about rotating / flipping images with gdiplusx.
here's some adapted code from a previous post that used _gdiplus.vcx, but this time using gdiplusx:
 
rotating and / or flipping images is a very simple task for gdi+. to see the different results possible, change the constant value in the variable lnenumrotateflip in the code below.
 
important
requires vfp9 and gdiplusx to run. 
please make sure that you have the latest version!
http://www.codeplex.com/vfpx/wiki/view.aspx?title=gdiplusx&referringtitle=home

 

* init gdiplusx
do locfile("system.app")

local lobmp as xfcbitmap
local lnenumrotateflip

with _screen.system.drawing

   lobmp = .bitmap.fromfile(… Continue reading

i'm very happy to announce that my guru, bo durban, has just started his blog.

http://blog.moxiedata.com/

working with him in the gdiplusx library has been very inspiring, exciting and pleasant. i've really learned a lot with him in the last year.

don't forget to update your readers, because bo's stuff is genius !

welcome to the blogosphere bo !

sometimes users need to make some basic modifications in images that are part of the application, and it is not comfortable for them too have to look for files, choose places to save, etc... in the vast majority of cases, ms-paint does the job, but i always needed it to be customized... and i couldn't.

after being challenged by frank cazabon in a foxite thread, i finally took the courage to create my own "paint" application, using gdi+.

vfppaint works much like mspaint, and creates a canvas that permits you to draw whatever you want with the mouse.

it's… Continue reading