screen resolution

2 views
Skip to first unread message

Mark13

unread,
Oct 27, 2007, 8:37:06 AM10/27/07
to Seashore Developers
I've opened an image with 100dpi and it was rendered smaller than in
GIMP at 100% zoom
because of the width*(72.0/xres) calculation in SeaView.

I'd suggest the following change:

--- Seashore/source/display/SeaView.m (revision 247)
+++ Seashore/source/display/SeaView.m (working copy)
@@ -58,10 +58,6 @@
// Determine the frame at 100% 72-dpi
frame = NSMakeRect(0, 0, [(SeaContent *)[document contents]
width], [(SeaContent *)[document contents] height]);

- // Adjust frame for non 72 dpi resolutions
- if ([[document contents] xres] != 72) frame.size.width /=
((float)[[document contents] xres] / 72.0);
- if ([[document contents] yres] != 72) frame.size.height /=
((float)[[document contents] yres] / 72.0);
-
// Initialize superclass
if ([super initWithFrame:frame] == NULL)
return NULL;

Mark13

unread,
Oct 27, 2007, 9:45:32 AM10/27/07
to Seashore Developers
Oh. I just saw that that calculation is used all over SeaView.

I do not know why it was done this way but it also suggests that we
can use any zoom factor
under Mac OS X without a noticeable impact on the performance. (I'm
using a G4@1GHz with
640MB RAM it Seashore is quite faster that Pixelmator, Artrage or X11
GIMP.)

Mark

unread,
Oct 28, 2007, 2:51:03 AM10/28/07
to Seashore Developers
The reason for the calculation is that Seashore aims to remain
faithful to the resolution.

Ultimately, I believe we should move in the direction of a user
preference with three options for handling resolution.

1. Ignore the resolution values in image files.
2. Treat the screen as 72 dpi. (This was standard practice with Macs
for quite some time)
3. Use the screen's native dpi. (I have the code for this attached to
a bug report on Seashore)

As you might have guessed, Seashore currently uses option two always.
So pictures with a higher resolution appear smaller when viewed at
100% zoom.

Mark.

Mark

unread,
Oct 28, 2007, 10:17:23 AM10/28/07
to Seashore Developers
I added the abilities outlined in my previous e-mail today. They are
now in the SVN.

There are still some bugs when Seashore gets a funny resolution (as is
often the case with the screen's true resolution).

Though these seem to disappear when the graphics context is set to
high interpolation.

I will look into these further later.

Mark.

Mark-André? Hopf

unread,
Nov 1, 2007, 3:20:32 PM11/1/07
to seasho...@googlegroups.com
Mark schrieb:

> I added the abilities outlined in my previous e-mail today. They are
> now in the SVN.
>
I've just tried r252 with resolution in image files being ignored.
Thanks! That works great for me.

Mark-André

--
TOAD -- A Simple and Powerful C++ GUI Toolkit for the X Window System
/OO\ Check it out at http://www.mark13.org/toad/
__(/_--_\)__________________________ Mark-André Hopf <mh...@mark13.org>


Reply all
Reply to author
Forward
0 new messages