Export & Resize JPEG Image of Chart
Posted: Tue Jan 13, 2009 5:29 pm
I am trying to export a JPEG image of a pie chart I have created. If I do not resize the image, it looks great - but if a try to resize the Chart it is unreadable - pie shape changes radically or disappears, etc.
Code I use in Visual FoxPro (VFP):
With thisform.mmTeeChart_Pie.Export.asJPEG
.CompressionQuality = 90
.GrayScale = .F.
.Height = 105
.Width = 120
.SaveToFile("c:\pie.jpg")
ENDWITH
All I want is an image that looks EXACTLY like the bigger version - only smaller (like a thumbnail). Maybe just specify width and be able to use "Keep Aspect Ratio" type command to calculate the height. Is that possible?
Code I use in Visual FoxPro (VFP):
With thisform.mmTeeChart_Pie.Export.asJPEG
.CompressionQuality = 90
.GrayScale = .F.
.Height = 105
.Width = 120
.SaveToFile("c:\pie.jpg")
ENDWITH
All I want is an image that looks EXACTLY like the bigger version - only smaller (like a thumbnail). Maybe just specify width and be able to use "Keep Aspect Ratio" type command to calculate the height. Is that possible?