--- a/Image.st Thu Dec 02 16:06:10 1999 +0100
+++ b/Image.st Thu Dec 02 16:29:31 1999 +0100
@@ -1409,7 +1409,7 @@
fromFile:aFileName resolution:res
"read an image from a file and (if required) scale the image
- as appropriate (only with very high resolution displays).
+ as appropriate (only req'd for very high resolution displays).
Return nil (or whatever a handler returned),
if the file is unreadable or does not contain an appropriate image."
@@ -1421,7 +1421,7 @@
fromFile:aFileName resolution:dpi on:aDevice
"read an image from a file and (if required) scale the image
- as appropriate (only with very high resolution displays).
+ as appropriate (only req'd with very high resolution displays).
Prepare a device representation.
Return nil (or whatever a handler returned),
if the file is unreadable or does not contain an appropriate image."
@@ -1438,7 +1438,11 @@
dev := Screen current
].
- dpiH := dev horizontalPixelPerInch.
+ dev notNil ifTrue:[
+ dpiH := dev horizontalPixelPerInch.
+ ] ifFalse:[
+ dpiH := 90
+ ].
((dpi >= (dpiH * 0.75)) and:[dpi <= (dpiH * 1.5)]) ifTrue:[^ img].
mag := (dpiH / dpi) rounded.
mag = 0 ifTrue:[^ img].
@@ -1446,7 +1450,6 @@
img := img magnifiedBy:(mag @ mag).
aDevice notNil ifTrue:[
- "should not happen ..."
^ img onDevice:aDevice
].
^ img
@@ -11993,6 +11996,6 @@
!Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.286 1999-11-23 16:47:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.287 1999-12-02 15:29:31 cg Exp $'
! !
Image initialize!