Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Image sizing math problem
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Miscellaneous
Thread ID:
01076213
Message ID:
01076300
Views:
20
Michael,

So what is an acceptable final size for your 602x602 image?

In general I've found that you can almost always change an image by a factor of two a couple of times without serious degrading of the image.

I don't know if GDI+ gives you any clipping functions or not, if it does you could clip the image from 0,0 to 599,599 and then resize it to 300x300.

If not is resizing it from 602x602 to 301x301 and then down to 150x150 going to work?

>I need to resize uploaded images to a max of 300x300.
>
>I can do a simple resize, but image quality is lousy depending upon the resizing proportions. For example, resizing 600x600 to 300x300 is great - but resizing 602x602 to 300x300 is lousy due to pixel averaging.
>
>So, when I do it manually in an image editor, I reduce it so that pixels are evenly divided using a calculator (and sometimes by adding whitespace around an image before reducing).
>
>I have to work out some mathematical method of doing this - does anyone have any insights before I start wrapping my brain around this problem?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform