Closed Bug 102755 Opened 23 years ago Closed 13 years ago

dpi should change visual image size

Categories

(Core :: Graphics: ImageLib, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: malx, Unassigned)

References

()

Details

It is strange that dpi still have effect on Images(also ZOOM btw)
In meantime new 200dpi displays become popular and you'll see no  images there.
Some image types have info about theirs actual size/dpi.
For others you should be able to enter "default image dpi" and scale
image accordingly to dpi preference.

It should have on/off setting with deault - on.
over to imagelib. This sounds like an interesting idea. It'll probably break
lots of sites' layouts, though.
Assignee: mjudge → pavlov
Status: UNCONFIRMED → NEW
Component: Image Conversion Library → ImageLib
Ever confirmed: true
Of course the best way is to have button(shotcut) to enable/disable this
feature for given window/Tab.
But I thinks it will not breake design (tables whould be enlarged automatically)
Target Milestone: --- → Future
Summary: [RFE] dpi should change visual image size → dpi should change visual image size
Depends on: pixels
Adding a URL about the implementation of this feature in IE6.
I might suggest that monitor DPI settings *not* adjust the size of images.  A
pixel is a pixel, and absent any associated styling, a rasterized image should
consume as many dots/pixels as it was designed for.  If an image format carries
a DPI preference, that should be respected and the image scaled appropriately
for the DPI settings of the screen (a 900-pixel 900 dpi image should consume 1
inch on a 90dpi monitor, not 10).  Style sheets would obviously take precedence.

I would even advocate similar behavior for the 'px' CSS unit, though CSS mildly
disagrees.  From http://www.w3.org/TR/CSS2/syndata.html#length-units:

"Pixel units are relative to the resolution of the viewing device, i.e., most
often a computer display. If the pixel density of the output device is very
different from that of a typical computer display, the user agent should rescale
pixel values. It is recommended that the reference pixel be the visual angle of
one pixel on a device with a pixel density of 90dpi and a distance from the
reader of an arm's length. For a nominal arm's length of 28 inches, the visual
angle is therefore about 0.0227 degrees.

"For reading at arm's length, 1px thus corresponds to about 0.28 mm (1/90 inch).
When printed on a laser printer, meant for reading at a little less than arm's
length (55 cm, 21 inches), 1px is about 0.21 mm. On a 300 dots-per-inch (dpi)
printer, that may be rounded up to 3 dots (0.25 mm); on a 600 dpi printer, it
can be rounded to 5 dots."

As displays become increasingly capable, the DPI discrepancy between a
"reference" 90dpi and a printer will disappear, making these conditions
applicable only to viewing devices of the period.

Layouts are too dependent upon pixel sizes and need to accomodate more
meaningful units with a stress towards em and ex, *even for images*.  If
rasterized images look awful as a result, we need to improve our rendering of
rasterized images.
Also see bug 192724
Was this fixed by the patch in bug 177805?
Assignee: pavlov → nobody
QA Contact: tpreston → imagelib
Depends on: 477209
(In reply to Jesse Ruderman from comment #6)
> Was this fixed by the patch in bug 177805?

Definitely not. IIUC the present bug is asking for resolution-independence in displaying images in web pages.

If the proposition were to completely decouple "px" units in HTML from actual pixels, I'd say that's a definite no, since it would take away from webdevs a useful feature. Pixels are still very meaningful in 2011, they will only become meaningless when _all_ devices will be above 200 DPI or so.

If, on the other hand, the proposal is to only do that by default i.e. <img src="foo.png"> while still allowing webdevs to explicitly specify sizes in px units, I suppose that could be discussed. It would be a _huge_ change, probably breaking many pages as Boris said in comment 1, so I'm not sure at all that this idea will get any traction, but if you care, the best thing to do is to write to the dev-platform mailing list,

http://groups.google.com/group/mozilla.dev.platform
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.