Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GDI+ Rotate Image
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01031347
Message ID:
01031746
Views:
15
But be carefull, the suggestion I made changes the size (which in your case it may actually increase the actual size)
oImg=oImage.GetThumbnailImage(32,33)
I guess you need to make sure the size parameters match the original size of the picture.
After testing the function, I noticed that a TIFF file increases in size, and a jpeg will reduce a bit. Not sure why.

>This looks like it will work. I changed the last line to read:
>
>oImage.SaveToFile('c:\ImgRot.tiff',"image/tiff",'quality=100')
>
>
>The only concern I have is that the size (disk space) of the image doubles. I have tried adjusting the quality=XXX, and the size is the same.
>
>Its not a big deal, they are small files, 20K so if they go to 40K I will be fine. If there is something I can do to avoid the increase I would prefer that. Any ideas?
>
>
>
>>Try this.
>>
>>
#define GDIPLUS_ROTATEFLIPTYPE_RotateNoneFlipNone 0
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate90FlipNone   1
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate180FlipNone  2
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate270FlipNone  3
>>
>>#define GDIPLUS_ROTATEFLIPTYPE_RotateNoneFlipX    4
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate90FlipX      5
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate180FlipX     6
>>#define GDIPLUS_ROTATEFLIPTYPE_Rotate270FlipX     7
>>
>>oImage= newobject(GpBitmap','ffc/_gdiplus.vcx')
>>oImage.CreateFromFile(GETpic())
>>oImage.RotateFlip(GDIPLUS_ROTATEFLIPTYPE_Rotate180FlipNone )
>>oImg=oImage.GetThumbnailImage(32,33)
>>oImg.SaveToFile('c:\ImgRot.jpg',"image/jpeg",'quality=100')
>>
>>
>>>I have a large number of tiff images I need to rotate 180 degrees.
>>>
>>>What is the most effective way to do this?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform