You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Adrian Cumiskey <ad...@gmail.com> on 2007/08/01 15:54:53 UTC

AFP Output Resolution

Hi,

Currently the AFPRenderer is fixed to use a calculation against a static 
final DPI_CONVERSION_FACTOR_240 to produce 240 dpi output.  I've looked 
at the code, and it looks fairly straight forward to introduce an extra 
configuration setting which would allow the user to modify this 
calculation so that other desired resolutions can be produced.  So I was 
thinking of introducing a new variable and trying it out.  I thought a 
candidate name for this setting might be something like 
target-resolution, but of course we have that already as a general 
setting for the purposes of adjusting resolution output on bitmap renderers.

So what do you think would be a suitable name for this new setting?
And do you think it would make sense to have target-resolution and 
source-resolution (also?) available as a renderer specific setting?

Adrian.

Re: AFP Output Resolution

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 04.10.2007 16:39:05 Chris Bowditch wrote:
> Jeremias Maerki wrote:
> 
> > Ok, I agree that renderer-resolution is a good name if we need a
> > per-renderer setting for the resolution. But applying Adrian's patch
> > #43041 would leave the codebase in a strange situation where you have to
> > configure the AFP renderer through the renderer setting and the TIFF/PNG
> > renderers through target-resolution. And that just begs for confusion.
> > 
> > I guess I still have a problem where to draw the line between
> > target-resolution and renderer-resolution, for example when looking at
> > the PDF renderer.
> 
> Well if the renderer-resolution is specified for PDF then it overrides 
> the target-resolution. Otherwise the PDF renderer should use 
> target-resolution as it does now.

Yes, that works for PDF, but for AFP, the default resolution is 240 dpi.
Not specifying a renderer-resolution would make the default resolution
72 dpi from the target-resolution. I guess I'll just add a check to see
if the target-resolution is on the default value in which case AFP would
still use 240 dpi.

> I think a per renderer resolution is needed because users are likely to 
> want to treat AFP differently to Tiff output. I don't think it is 
> acceptable to require a separate configuration file depending on whether 
> you want to generate AFP or Tiff etc.

I can agree with that.


Thanks a lot,
Jeremias Maerki


Re: AFP Output Resolution

Posted by Chris Bowditch <bo...@hotmail.com>.
Jeremias Maerki wrote:

> Ok, I agree that renderer-resolution is a good name if we need a
> per-renderer setting for the resolution. But applying Adrian's patch
> #43041 would leave the codebase in a strange situation where you have to
> configure the AFP renderer through the renderer setting and the TIFF/PNG
> renderers through target-resolution. And that just begs for confusion.
> 
> I guess I still have a problem where to draw the line between
> target-resolution and renderer-resolution, for example when looking at
> the PDF renderer.

Well if the renderer-resolution is specified for PDF then it overrides 
the target-resolution. Otherwise the PDF renderer should use 
target-resolution as it does now.

I think a per renderer resolution is needed because users are likely to 
want to treat AFP differently to Tiff output. I don't think it is 
acceptable to require a separate configuration file depending on whether 
you want to generate AFP or Tiff etc.

<snip/>

Chris



Re: AFP Output Resolution

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Ok, I agree that renderer-resolution is a good name if we need a
per-renderer setting for the resolution. But applying Adrian's patch
#43041 would leave the codebase in a strange situation where you have to
configure the AFP renderer through the renderer setting and the TIFF/PNG
renderers through target-resolution. And that just begs for confusion.

I guess I still have a problem where to draw the line between
target-resolution and renderer-resolution, for example when looking at
the PDF renderer.

Jeremias Maerki



On 02.08.2007 15:28:23 Chris Bowditch wrote:
> Vincent Hennebert wrote:
> 
> > Hi Chris,
> > 
> > Hmmm, I’m perhaps making a confusion here. I thought target-resolution 
> > did also apply to the whole images generated by the renderer; i.e., for 
> > the TIFF renderer, the resolution of the image representing the whole 
> > document, and not only images inside it. Isn’t that the case? Then, why 
> > wouldn’t target-resolution also apply to images in PDF output?
> 
> Good point. I overlooked the Tiff and PNG Renderers in my reply. Target 
> aka default resolution would apply to images in PDF as well as the 
> resolution of the generated Tiff, PNG etc.
> 
> > 
> > Perhaps I should ask the question on fop-user, I’m sure I will find 
> > there nice developers who will enlighten me...
> > 
> > 
> >>"output" and "target" have similar semantics in
> >>the English language and the distinction between them will not be clear
> >>enough for the users. Maybe the general purpose one (which currently
> >>only controls batik) should be "default-resolution" and it could also
> >>apply to images for renderers which dont have an explicit
> >>"renderer-resolution"
> > 
> > 
> > renderer-resolution sounds fine to me.
> 
> Great. I think it is a lot clearer than "output-resolution"
> 
> Chris
> 


Re: AFP Output Resolution

Posted by Chris Bowditch <bo...@hotmail.com>.
Vincent Hennebert wrote:

> Hi Chris,
> 
> Hmmm, I’m perhaps making a confusion here. I thought target-resolution 
> did also apply to the whole images generated by the renderer; i.e., for 
> the TIFF renderer, the resolution of the image representing the whole 
> document, and not only images inside it. Isn’t that the case? Then, why 
> wouldn’t target-resolution also apply to images in PDF output?

Good point. I overlooked the Tiff and PNG Renderers in my reply. Target 
aka default resolution would apply to images in PDF as well as the 
resolution of the generated Tiff, PNG etc.

> 
> Perhaps I should ask the question on fop-user, I’m sure I will find 
> there nice developers who will enlighten me...
> 
> 
>>"output" and "target" have similar semantics in
>>the English language and the distinction between them will not be clear
>>enough for the users. Maybe the general purpose one (which currently
>>only controls batik) should be "default-resolution" and it could also
>>apply to images for renderers which dont have an explicit
>>"renderer-resolution"
> 
> 
> renderer-resolution sounds fine to me.

Great. I think it is a lot clearer than "output-resolution"

Chris



Re: AFP Output Resolution

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Chris,

Chris Bowditch a écrit :
> Vincent Hennebert wrote:
> 
>> Well it seems that target-resolution would also be fine for AFP.
>> Actually, by looking at the doc it seems that this parameter actually
>> has 2 different purposes: the resolution of the output when FOP produces
>> bitmap images, and the resolution of images produced by Batik (although
>> I don’t really get that latter).
>>
>> It will perhaps make sense to separate those 2 purposes and make the
>> former renderer-specific. Something like “output-resolution” would make
>> sense to me. “target-resolution” would be kept as a general setting and
>> would only apply to Batik.
>>
>> Does that make sense?
> 
> Everything except the names. I think it makes sense to have one general
> purpose resolution setting and then renderer specific settings which
> control renderer specific resolution. In the case of AFP this will
> affect more than just imgaes, but for other renderers we are just
> talking about images.

Hmmm, I’m perhaps making a confusion here. I thought target-resolution 
did also apply to the whole images generated by the renderer; i.e., for 
the TIFF renderer, the resolution of the image representing the whole 
document, and not only images inside it. Isn’t that the case? Then, why 
wouldn’t target-resolution also apply to images in PDF output?

Perhaps I should ask the question on fop-user, I’m sure I will find 
there nice developers who will enlighten me...

> "output" and "target" have similar semantics in
> the English language and the distinction between them will not be clear
> enough for the users. Maybe the general purpose one (which currently
> only controls batik) should be "default-resolution" and it could also
> apply to images for renderers which dont have an explicit
> "renderer-resolution"

renderer-resolution sounds fine to me.

Vincent


Re: AFP Output Resolution

Posted by Chris Bowditch <bo...@hotmail.com>.
Vincent Hennebert wrote:

> Hi Adrian,

<snip/>

> Well it seems that target-resolution would also be fine for AFP.
> Actually, by looking at the doc it seems that this parameter actually
> has 2 different purposes: the resolution of the output when FOP produces
> bitmap images, and the resolution of images produced by Batik (although
> I don’t really get that latter).
> 
> It will perhaps make sense to separate those 2 purposes and make the
> former renderer-specific. Something like “output-resolution” would make
> sense to me. “target-resolution” would be kept as a general setting and
> would only apply to Batik.
> 
> Does that make sense?

Everything except the names. I think it makes sense to have one general 
purpose resolution setting and then renderer specific settings which 
control renderer specific resolution. In the case of AFP this will 
affect more than just imgaes, but for other renderers we are just 
talking about images. "output" and "target" have similar semantics in 
the English language and the distinction between them will not be clear 
enough for the users. Maybe the general purpose one (which currently 
only controls batik) should be "default-resolution" and it could also 
apply to images for renderers which dont have an explicit 
"renderer-resolution"

Chris



Re: AFP Output Resolution

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Adrian,

Adrian Cumiskey a écrit :
> Hi,
>
> Currently the AFPRenderer is fixed to use a calculation against a static
> final DPI_CONVERSION_FACTOR_240 to produce 240 dpi output.  I've looked
> at the code, and it looks fairly straight forward to introduce an extra
> configuration setting which would allow the user to modify this
> calculation so that other desired resolutions can be produced.  So I was
> thinking of introducing a new variable and trying it out.  I thought a
> candidate name for this setting might be something like
> target-resolution, but of course we have that already as a general
> setting for the purposes of adjusting resolution output on bitmap
> renderers.
>
> So what do you think would be a suitable name for this new setting?
> And do you think it would make sense to have target-resolution and
> source-resolution (also?) available as a renderer specific setting?

Well it seems that target-resolution would also be fine for AFP.
Actually, by looking at the doc it seems that this parameter actually
has 2 different purposes: the resolution of the output when FOP produces
bitmap images, and the resolution of images produced by Batik (although
I don’t really get that latter).

It will perhaps make sense to separate those 2 purposes and make the
former renderer-specific. Something like “output-resolution” would make
sense to me. “target-resolution” would be kept as a general setting and
would only apply to Batik.

Does that make sense?
Vincent