Re: Various TIFF Rendering Questions
On 23.07.2010 18:00:04 Marquart, Joshua D wrote: All- Per my earlier posts, I'm converting FO to TIFF; I would like to be able to set - Resolution Unit to inches (2); I'm currently getting Centimeters (3) As you noticed already, this is currently hard-coded. A change would be necessary here. - Rows Per Strip to preference one large strip (length of the ImageLength field) instead of value 1 - StripOffsets to result in one entry per page (one large strip), rather than one per row - StripByteCounts to be the number of bytes in the page after compression. I have read that producing a TIFF as one large strip / one entry per page per above results in a similar quality file with an overall smaller footprint. Where have you read that? Are these settings possible in FOP to TIFF conversion? Depends on the codec being used to write the TIFF, I guess. I don't know without some research if that is possible, for example, with the TIFF Codec from JAI ImageIO Tools. But frankly, I can't imagine that these settings will make a significant difference. I figure these would be Renderer Options, but so far I'm not finding any data on this. I'll continue looking and post a solution if I find anything, but if anyone happens to know the answers to the above, that would be helpful. Thanks, -Josh Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Various TIFF Rendering Questions
- Resolution Unit to inches (2); I'm currently getting Centimeters (3) As you noticed already, this is currently hard-coded. A change would be necessary here. Yeah, and a fairly large change it would be, according to the source code. Is there a recommendation to use centimeters over inches, over was it just coded that way due to cultural preference (Europeans prefer metric; Americans prefer U.S. Units)? I am very willing to coordinate to help code an abstraction of the Resolution Unit. Meanwhile, I'm working to replace the Tiff Renderer with one of my own and override the Tiff Writer, but I can't get the ImageWriterRegistry.register() method to overrite with my custom ImageIOImageWriter class. Services loads the appropriate writers to ImageWriterRegistry, but default-preferred-order.properties is in the same package level as the class and I don't know if I want to mess with my ClassLoader to check in the base package level first. Unfortunately, due to getPriority() using the internal default properties file, the .imageio classes (priority 2000) are always preferred and my ImageWriter is never found; additionally, there is no way to set a priority when registering the ImageWriter. The comment for register() states Registers a new ImageWriter implementation in the registry. If an ImageWriter for the same target MIME type has already been registered, it is overwritten with the new one. Which, due to priority, ends up being false. I have a solution for this requiring alterations to ImageWriterRegistry; my current workaround is a custom Renderer that doesn't use ImageWriterRegistry. I have read that producing a TIFF as one large strip / one entry per page per above results in a similar quality file with an overall smaller footprint. Where have you read that? On the Sun forums: http://forums.sun.com/thread.jspa?threadID=5161294 I haven't tested it myself, but it looks like it produces the sort of file I'm aiming for, and I'll see what I can do to incorporate portions of his solution into my own code. -Josh - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Various TIFF Rendering Questions
All- Per my earlier posts, I'm converting FO to TIFF; I would like to be able to set - Resolution Unit to inches (2); I'm currently getting Centimeters (3) - Rows Per Strip to preference one large strip (length of the ImageLength field) instead of value 1 - StripOffsets to result in one entry per page (one large strip), rather than one per row - StripByteCounts to be the number of bytes in the page after compression. I have read that producing a TIFF as one large strip / one entry per page per above results in a similar quality file with an overall smaller footprint. Are these settings possible in FOP to TIFF conversion? I figure these would be Renderer Options, but so far I'm not finding any data on this. I'll continue looking and post a solution if I find anything, but if anyone happens to know the answers to the above, that would be helpful. Thanks, -Josh - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.
RE: Various TIFF Rendering Questions
Investigation ongoing, but it looks like Resolution Unit is hardcoded default to Centimeters (3) in the updateMetadata method of org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter.class -Josh - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.