How can I build an online tool that checks the size of an image?
July 21, 2009 1:11 PM   Subscribe

How can I make an online tool to show someone whether an image they've uploaded is high enough resolution for print?

I work in book publishing. One of the things I do is to help my authors organize the images they've gathered to include in the book. The complicating factor is often that authors (who are often not the savviest computer users) just go on Google to find images, and often end up with images that are much too small to print, because they are displayed at 72dpi on screen, and the author doesn't understand that the size an image is on a screen is not necessarily the same as in print.*

It would be incredibly useful if I could have an online tool to point them to that would be able to tell them "The image you have uploaded [or "the image at that url"] will print at 2.5" x 3.5", which is approximately 1/4 page" or something like that.

It would need to be able to:
  1. detect the dimensions of the image in pixels
  2. display the dimensions, in inches, that the image will be when displayed at 300dpi
  3. be able to tell the author a general size for that image (too small to print, 1/4 page, 1/2 page, full page, etc.) based on parameters I would include
How can I build this?

*I have actually had an author hold up a ruler to a computer monitor to say, "See, it's big enough!"
posted by ocherdraco to Computers & Internet (15 answers total) 5 users marked this as a favorite
 
Best answer: It's actually pretty easy. For instance, in PHP you'd use the getimagesize function (provided you have the GD extension installed - quite likely with PHP).
posted by le morte de bea arthur at 1:17 PM on July 21, 2009


Oh, actually the PHP function doesn't need GD. Silly me.
posted by le morte de bea arthur at 1:22 PM on July 21, 2009


Response by poster: I am not a programmer. I can code things in HTML, and can fuck around with php and javascript, but to call me a programmer would be like calling Sarah Palin a statesman.
posted by ocherdraco at 1:23 PM on July 21, 2009


Response by poster: le morte de bea arthur is going to hook me up. Thanks, lmdba.
posted by ocherdraco at 1:32 PM on July 21, 2009


How can I make an online tool to show someone whether an image they've uploaded is high enough resolution for print?

You realize that having a technical solution may not help, right? At best, many will probably just say "well, I like this picture and it looks big enough, so use this" or "here's the picture, make it work"

Not trying to dissuade you and whatever lmdba is whipping up sounds neat, just saying 'don't expect this to fix all your problems and in fact may create new ones'
posted by Brandon Blatcher at 1:45 PM on July 21, 2009


Note that even with LMDBA's hookup, just-savvy-enough-to-ruin-everything people will sometimes take low-resolution images and blow them up to 300 dpi, so while it's technically the correct size, the image will still be blurry and awful. Just a heads-up.
posted by Optimus Chyme at 1:46 PM on July 21, 2009


Response by poster: If nothing else, it will save me time when I'm trying to figure out resolution and print sizes. And that itself is worth a lot.
posted by ocherdraco at 1:58 PM on July 21, 2009


I may not be thinking about this clearly, but

- when you google search images it lists the pixel dimensions, tell them to look at that figure
- divide each figure by 300
- that will give you the dimensions at 300 dpi

so a 500 x 375 pixel image would be Print Worthy at only 1 2/3 inches by 1 1/4 inches

an 8.5 x 11 full size image would need to be 2550 pixels by 3300 pixels
posted by Wink Ricketts at 2:15 PM on July 21, 2009 [3 favorites]


Response by poster: Authors will not do that math. I have tried to explain that math to them before.
posted by ocherdraco at 2:25 PM on July 21, 2009


This is kind of off-topic, and perhaps you've thought of this and already solved it, but having your authors grab random photos off the web for inclusion in books sounds like it could create copyright problems.
posted by adamrice at 2:41 PM on July 21, 2009


Response by poster: Dude, copyright is a whole nother kettle of fish. Assume that I am working with public domain images. I am in book publishing. I know from copyright.
posted by ocherdraco at 2:45 PM on July 21, 2009


I figured i was missing something. :-D
posted by Wink Ricketts at 2:45 PM on July 21, 2009


No math needed. Just define the minimal dimensions in pixels and explain to them how to check (with Windows Image Preview or whatever they're using).

To print an image in 1" square size naturally it needs to be at least 300px wide and high. Given that number everybody should be able to check.

So your check list would say:
- For 1" images, at least 300 pixels
- For 2" images, at least 600 pixels
- etc pp

Don't try to explain the issue 'though. I've had many discussions with designers who should know and even they don't understand that an image does not have a resolution :-)
posted by oxit at 2:54 PM on July 21, 2009 [2 favorites]


As a photographer who frequently has clients or potential clients tell me, "We need it at 300 dpi [sic]", I firmly applaud your efforts! The general dumbassery of the

Many people simply "don't get" that unless they can provide pixel dimensions, or at least dimensions in inches for the potential use, they are telling me absolutely nothing when they deliver the "We need it at 300 dpi [sic]" line.

I think you need an app that will ask the following question:

Check the appropriate box below: Is your proposed use for the photo for:

__ Online Use?
__ Print publication (1/4 page or less)
__ Half page print publication?
__ I don't know, but we want the highest resolution possible!

At this point, your app should produce a generality like:

For optimal reproduction, you need an image which is [xxxx] pixels wide by [xxxx] pixels high.

Resolution (pixel dimensions) lower than this will result in inferior reproduction and possible visible pixellation, meaning that it will appear unsharp, grainy [sic], and pretty much announce that whomever selected it is clueless and that's why the picture looks like hell.
posted by imjustsaying at 2:57 PM on July 21, 2009


Response by poster: No math needed. Just define the minimal dimensions in pixels and explain to them how to check (oxit)

You are seriously overestimating the technical ability of some of the people I'm working with.

Guys, the question is not how to teach authors how to do this for themselves. It is how to build a tool to do it for them.

le morte de bea arthur is helping me out, and let's consider this one resolved.
posted by ocherdraco at 3:04 PM on July 21, 2009


« Older Too much coffee makes my stomach cry.   |   Wait for the weights? Newer »
This thread is closed to new comments.