enable the use of the -dDOINTEROLATE option of gs,
similar to the use of PS Anti-Aliasing. This will
improve the display of scanned images.
Discussion
Anonymous
-
2005-06-24
Logged In: YES
user_id=810188
I've created a patch of xdvi 22.84.10 that adds a switch
Options > Interpolate Images to use the -dDOINTERPOLATE
option of gs. Basically, it is a copy of all code for
gs_alpha.
Interpolation makes a difference in displaying, e.g.,
scanned images.
What is missing?
- documentation
- key binding
- testing
What do you think? Please point me to code and text that has
to be adjusted. I'd be happy to fix it.
Thanks very much for the patch! Maybe we can make
interpolating the default, and just provide an X resource to
turn it off? Or could there be serious ghostscript
performance issues if it's enabled?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-06-27
Logged In: YES
user_id=810188
I've placed another set of patches in my homepage, again
against xdvi 22.84.10: xdvi_22.84.10_interpolate_patch2.tar.gz
[I have no clue why I don't have a "add an
attachment"-button but I remember I had this problem before.]
It corrects a typo, binds the function to the key "I" and
implements the options {+,-}gsinterpolate.
There is a problem with resources and the menu that I cannot
fix myself. E.g. xdvi -dointerpolate does interpolation but
the menu doesn't have the option checked. After quitting
xdvi the corresponding resource is set to true. But after
restart (without -dointerpolate) interpolation is switched off.
Uli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What I meant by making it the default and just providing an
X resource was: If it makes sense to have this resource
always turned on, then we may not need to expose it in the
UI at all (in the options menu); a resource to turn it off
on very old machines where performance is an issue may be
enough.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-06-27
Logged In: YES
user_id=810188
Oops, I forgot about your comment.
Yes, I think interpolation can be the default:
- I have no performance problems with it on my machine
- It's a default in acroread, too (I guess).
BTW: Couldn't be the same said about anti-aliasing? Setting
this option doesn't make a big difference performancewise -
at least on my machine.
Uli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> Yes, I think interpolation can be the default:
> - I have no performance problems with it on my machine
> - It's a default in acroread, too (I guess).
OK, so I think we'll go with the X resource only for
starters (we can always add a GUI option later if necessary).
> BTW: Couldn't be the same said about anti-aliasing?
In principle yes, but the problem with that is that it used
to be off by default in previous versions (and in non-k
xdvi), and I was somehow reluctant to change that. Plus,
there were a few bugs related to that - see e.g.
BTW, could you send me a sample file with which I can see
the effect? The ghostscript docs mention `scaled images', so
I guess it's most obvious with converted pixmaps, but I
tried a few scaled graphics files but couldn't see any
difference ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> So does the change suggested in ... fix your problem with
the partial > deletion of graphics?
I tried to use it but it is a patch against 22.82. It does
not work for the (unchanged) 22.84.10. I just tried it with
a clean 22.82 but it failed, too:
[scholzuh@kiste:xdvik] >patch < special.c_patch
patching file special.c
Hunk #1 FAILED at 1380.
Hunk #2 FAILED at 1426.
Hunk #3 FAILED at 1567.
3 out of 3 hunks FAILED -- saving rejects to file special.c.rej
Logged In: YES
user_id=810188
I've created a patch of xdvi 22.84.10 that adds a switch
Options > Interpolate Images to use the -dDOINTERPOLATE
option of gs. Basically, it is a copy of all code for
gs_alpha.
Interpolation makes a difference in displaying, e.g.,
scanned images.
What is missing?
- documentation
- key binding
- testing
What do you think? Please point me to code and text that has
to be adjusted. I'd be happy to fix it.
Regards, Uli
PS. Oops, I don't have a button to attach files. Why that?
You can download the patch files under
http://www.eml-development.de/english/homes/elting/scholz/xdvi_22.84.10_interpolate_patch.tar.gz
Logged In: YES
user_id=177175
Thanks very much for the patch! Maybe we can make
interpolating the default, and just provide an X resource to
turn it off? Or could there be serious ghostscript
performance issues if it's enabled?
Logged In: YES
user_id=810188
I've placed another set of patches in my homepage, again
against xdvi 22.84.10: xdvi_22.84.10_interpolate_patch2.tar.gz
[I have no clue why I don't have a "add an
attachment"-button but I remember I had this problem before.]
It corrects a typo, binds the function to the key "I" and
implements the options {+,-}gsinterpolate.
There is a problem with resources and the menu that I cannot
fix myself. E.g. xdvi -dointerpolate does interpolation but
the menu doesn't have the option checked. After quitting
xdvi the corresponding resource is set to true. But after
restart (without -dointerpolate) interpolation is switched off.
Uli
Logged In: YES
user_id=177175
What I meant by making it the default and just providing an
X resource was: If it makes sense to have this resource
always turned on, then we may not need to expose it in the
UI at all (in the options menu); a resource to turn it off
on very old machines where performance is an issue may be
enough.
Logged In: YES
user_id=810188
Oops, I forgot about your comment.
Yes, I think interpolation can be the default:
- I have no performance problems with it on my machine
- It's a default in acroread, too (I guess).
BTW: Couldn't be the same said about anti-aliasing? Setting
this option doesn't make a big difference performancewise -
at least on my machine.
Uli
Logged In: YES
user_id=177175
> Yes, I think interpolation can be the default:
> - I have no performance problems with it on my machine
> - It's a default in acroread, too (I guess).
OK, so I think we'll go with the X resource only for
starters (we can always add a GUI option later if necessary).
> BTW: Couldn't be the same said about anti-aliasing?
In principle yes, but the problem with that is that it used
to be off by default in previous versions (and in non-k
xdvi), and I was somehow reluctant to change that. Plus,
there were a few bugs related to that - see e.g.
http://sourceforge.net/tracker/?group_id=23164&atid=377580&func=detail&aid=633420
http://sourceforge.net/tracker/?group_id=23164&atid=377580&func=detail&aid=889804
BTW, could you send me a sample file with which I can see
the effect? The ghostscript docs mention `scaled images', so
I guess it's most obvious with converted pixmaps, but I
tried a few scaled graphics files but couldn't see any
difference ...
Logged In: YES
user_id=810188
You are right: Anti-aliasing has some problems. Actually, I
even reported the second problem myself ;-) BTW, I think
that this problem is related to the incorrect layering of ps
specials, see
http://sourceforge.net/tracker/index.php?func=detail&aid=1158030&group_id=23164&atid=377580
I put an example dvi for the effect of -dDOINTERPOLATE at
http://www.eml-development.de/english/homes/elting/scholz/beispiel.dvi
Uli
Logged In: YES
user_id=177175
> BTW, I think
> that this problem is related to the incorrect layering of ps
> specials
So does the change suggested in
http://sourceforge.net/tracker/index.php?func=detail&aid=1158030&group_id=23164&atid=377580
fix your problem with the partial deletion of graphics?
>http://www.eml-development.de/english/homes/elting/scholz/beispiel.dvi
Thanks, could you also upload `bild2.ps'?
Logged In: YES
user_id=810188
> could you also upload `bild2.ps'
done:
http://www.eml-development.de/english/homes/elting/scholz/bild2.ps
> So does the change suggested in ... fix your problem with
the partial > deletion of graphics?
I tried to use it but it is a patch against 22.82. It does
not work for the (unchanged) 22.84.10. I just tried it with
a clean 22.82 but it failed, too:
[scholzuh@kiste:xdvik] >patch < special.c_patch
patching file special.c
Hunk #1 FAILED at 1380.
Hunk #2 FAILED at 1426.
Hunk #3 FAILED at 1567.
3 out of 3 hunks FAILED -- saving rejects to file special.c.rej
scholzuh@kiste:xdvik] >more special.c.rej
***************
*** 1380,1385 ****
#if PS
if (INSIDE_MANE_WIN) {
psp.drawend(cp);
}
#endif
bbox_valid = False;
--- 1380,1386 ----
#if PS
if (INSIDE_MANE_WIN) {
psp.drawend(cp);
+ psp.endpage();/*IHH*/
}
#endif
bbox_valid = False;
***************
*** 1425,1430 ****
psp.drawbegin(PXL_H - currwin.base_x,
PXL_V - currwin.base_y, cp);
psp.drawend("");
}
}
#endif
--- 1426,1433 ----
psp.drawbegin(PXL_H - currwin.base_x,
PXL_V - currwin.base_y, cp);
psp.drawend("");
+ psp.endpage();/*IHH*/
+
}
}
#endif
***************
*** 1564,1569 ****
/* talk directly with the DPSHandler here */
send_ps_file(filename, kpse_pict_format);
psp.drawend(" @endspecial");
#else
draw_bbox();
#endif
--- 1567,1573 ----
/* talk directly with the DPSHandler here */
send_ps_file(filename, kpse_pict_format);
psp.drawend(" @endspecial");
+ psp.endpage();/*IHH*/
special.c.rej