[ 
https://issues.apache.org/jira/browse/IMAGING-271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17219394#comment-17219394
 ] 

Bruno P. Kinoshita commented on IMAGING-271:
--------------------------------------------

Sounds good to me Gary! (y) Once you have a pull request we should be able to 
test it, and drop an e-mail to dev-list & user-list to tell users about this 
new writer. Some of them might be interested  in pre-testing it before the 
release.

> Proposed new class for memory-efficient TIFF image writing
> ----------------------------------------------------------
>
>                 Key: IMAGING-271
>                 URL: https://issues.apache.org/jira/browse/IMAGING-271
>             Project: Commons Imaging
>          Issue Type: New Feature
>          Components: Format: TIFF
>    Affects Versions: 1.0-alpha3
>            Reporter: Gary Lucas
>            Priority: Major
>         Attachments: TiffImageWriterAppender.java
>
>
> I am proposing to implement a new class for writing TIFF images in a 
> memory-efficient manner. This class will permit the creation of large-scale 
> TIFF images without undue requirements for memory.  It will also support the 
> creation of TIFF files containing multiple images (in TIFF terminology, 
> "directories").
> I am posting this Jira item to request suggestions for the design of the 
> class as well as to identify requirements from potential users.
> The current TIFF image-writer classes operate on an entire BufferedImage and 
> actually make a copy of the image data before writing it to an output stream. 
>  They do not permit the creation of output images "a piece at a time".  So 
> for very large images, they can require considerable use of memory.
> The proposed approach would allow an application to "append" data to a TIFF 
> file making multiple calls to output methods. The TIFF specification calls 
> for files to be organized into "sections" (strips or tiles). This class will 
> permit an application to write data to the TIFF file a section at a time.
>  I have attached a stub Java class to provide an example of the proposed 
> design. This example is intended to promote discussion and help identify 
> relevant features for the initial implementation.
> Some guiding principles and concepts for design:
>  # Simplicity.  The greatest strength of the TIFF file format, its 
> versatility, is also its greatest weakness. The need to support such a large 
> variety of data formats and operations leads to a complicated API that is 
> sometimes difficult to use.  The proposed design limits some of the output 
> functionality in order to maintain a simpler API. 
>  # Essential features only.  Currently, I have limited resources to devote to 
> this implementation. My intention is to implement only those functions that 
> make the class viable. So the challenge here will be determining what those 
> features are. Comments are welcome. On the other hand, I am striving for a 
> design that will facilitate future development to add other features as they 
> are identified by the user community. 
>  # Operates on files, and only files.  The current Commons Imaging API 
> supports output to various kinds of Java OutputStreams, including memory and 
> socket streams. This class is purposely designed to write to random-access 
> files. This consideration is particularly important to support cases where 
> the ultimate size of the output content cannot be determined a priori.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to