[whatwg] Wish: Restrict Image Size on Upload

Greg Kilwein gkilwein at fbsdata.com
Mon Dec 27 08:07:40 PST 2004


Ian Hickson wrote:

>On Mon, 27 Dec 2004 what at keepthebyte.ch wrote:
>  
>
>>It would be useful to be able to define a bounding box of allowed 
>>picture width and height when uploading picture(s). The UA would need to 
>>check if the selected picture(s) is/are inside the allowed range (min - 
>>max width & height). With picture I generally mean the internet 
>>widespread formats (png, gif, jpg).
>>    
>>
>
>With the coming of high-resolution monitors, the pixel size of the image 
>will presumably become less important, as monitors will be getting more pixels per centimeter.
>  
>
I disagree.  Displaying an image on a high resolution monitor is a 
different issue than controlling the number of pixels that the image may 
contain.  A given device (screen, printer, PDA, projector, or other 
media) may scale an image's pixels as necessary for optimal viewing.  
Most UAs have some sort of pixel scaling that occurs when an HTML 
document is printed.  For example, I find that an image that is 
approximately 700 by 600 pixels will print nicely on a single page in 
Internet Explorer for the majority of users with a variety of margin 
settings.  This makes pixel size very relevant when the exact image 
dimensions are unknown, so images over a certain size could be 
disallowed if the page is to be printed.  It's possible to do this now 
with some server-side image manipulation, but would be nice to have 
inside UAs.  Ideally, there would be the ability to provide hints to the 
UA so it could resize the image upon upload, rather than just displaying 
an error message.

Why would a high resolution monitor make the pixel size less important?  
Presumably, the pixel size would remain important, since the sharpest 
images would be those that match the pixel resolution of the monitor.  
Pixel scaling of any kind on a monitor typically results in reduced 
image quality, either by means of pixelation or aliasing.

>Web Forms 2 does provide a way to limit the file size, however, which is 
>presumably more important.
>  
>
I think both the pixel size limits as well as file size limits are of 
equal importance, since they are solutions for separate issues.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20041227/55d47afc/attachment-0001.htm>


More information about the whatwg mailing list