Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display scanned images as big as the original document

Status
Not open for further replies.

whirlpool6

Technical User
Sep 2, 2007
58
JP
hello guys,

i am making a web application which displays scanned documents. now my clients want to see the scanned images just as big as the original document. the need to compare sizes of things. if an A4 document is scanned, they want to see the displayed image just as big as an A4 document.

can somebody pls help me with this? thank you very much.
 
The display size of the document relies on a number of factors, some of which you have no control over.
Monitor size will determine the physical size of the image.
Higher monitor resolution will result in a smaller displayed image.
Resolution of the original image will determine the actual size of the image.
Just many variables Im afraid.


Keith
 
Through CSS you could style images to be displayed at the exact centimeters that match A4 format. I don't know how it would look, but you could say that you did it.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
You would have to save the scanned images as 100% or 1:1 and then display them that way. You do realize however that images of those dimensions will produce huge file sizes.

And as has been mentioned depending on the screen resolution, the images will look smaller or bigger.

Image size in a PC is relative.

But just as an example: At 200 pixels per inch, and A4 sized image should be 1664 by 2339 pixels.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
thank you all for responding... it is very much appreciated.

dont worry about monitor resolution and monitor dpi/ppi. javascript can get these factors.

what i am really afraid of is that we have no control with the scanning factor nor with the size of the original scanned document. clients can scan A4 documents with 300dpi, A4 documents with 100dpi, B3 documents with 200dpi, etc.

pour in your ideas guys. thank you.
 
You can not determine the DPI of an image client side.

However, as I pointed out to you in the other thread you started on exactly the same topic, most server-side environments have powerful and elegant image-handling libraries readily available.

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

Webflo
 
dwarf we cant use serverside technologies for this. this would clog up our servers. this will slow down the system. actually we have a functionality on this system before using PHP which do some enhancements on the image. this really ate up all the server memory.

for now im looking into client side technologies as much as possible. maybe this can be done.
 
It'll slow down your system a lot more if you're downloading multi-megabyte document images and resizing them (generally rather crudely) in the browser.

What you need to do is determine the resolution of your monitor(s) in dpi terms. For example: my monitor is 12" wide, and set to 1024x768 pixels. Therefore it's showing 1024/12 = 85 dpi(approx). So, for an A4 document (8.25"x11.25") to be displayed "real size" on my screen, it'd have to be 701x956 pixels. A bit big for normal web use, but not huge.

If it puts too much load on the server to resize images on the fly, could you not resize them once when they're first uploaded to the server. As well as the original image, generate and store the "real size" version and serve that up by default.

Incidentally, don't be seduced by the notion that setting the dpi value in a package like Photoshop has any influence on how images are displayed online. It's not true. The only thing that matters is the pixel x pixel dimensions. This page explains why at some length:
-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top