[Clipart] upload_svg.cgi and shell.php

Jonadab the Unsightly One jonadab at bright.net
Sat Sep 25 16:05:57 PDT 2004


Nicu Buculei <nicu at apsro.com> writes:

> also if the resize is done in HTML the image will look ugly and may
> not respect original proportion

As far as respecting original proportions, there's not really any good
way to do that when you're forcing the image to particular dimensions.

You could force a certain value for _one_ dimension and preserve the
aspect ratio, but when you resize to exactly 195x146, it's not going
to be too bad if the original is 640x480 or 800x600 or some multiple
of one of those, but if the original is some esoteric screen shape
(taken on e.g. a widescreen display) it's going to look wrong
regardless.  This is another good reason for allowing the submitter to
provide a thumbnail -- because they can crop it to the right shape,
before resizing.  (We _could_ crop it automatically, but when you do
that you don't know what you're cropping off, and whether it might be
better to crop differently...)

It's true that browsers don't do as good a job of scaling as a real
photo editing application does.  Definitely, anyone who supplies their
own thumbnail _should_ provide it at the correct size.  As of this
afternoon, the screenshot uploading script does chmod on the
thumbnails to make them group-writeable (though this still SHOULD be
taken care of by system configuration settings, such as file creation
masks or whatnot), so if we need to adjust any of the submitted
thumbnails we will be able to do that.

However, like I said, I still could make the upload tool autoresize
user-provided thumbnails.  I will definitely do that if people start
providing thumbnails at the wrong sizes.

-- 
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,"ten.thgirb\@badanoj$/ --";$\=$ ;-> ();print$/




More information about the clipart mailing list