octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imwrite parameter framework patch (with full gif support)


From: John Swensen
Subject: imwrite parameter framework patch (with full gif support)
Date: Fri, 1 Oct 2010 01:07:38 -0400

This patch contains the framework for implementing all the available imwrite 
parameters.  In fact, in its current state it accepts the allowable parameters 
and warns which ones are not implemented.  This patch also contains the full 
implementation of the gif parameters with one small caveat: for whatever reason 
ML always outputs a full color map for GIF images (i.e. 256 values) regardless 
of how many colors are in the image.  *Magick on the other hand only uses as 
many as necessary.  This has implications for how the BackgroundColor and 
TransparentColor are handled, as the input value is not a pixel value, but an 
index into the colormap.  I am still trying to figure out how to force *Magick 
to do the same thing, but in the meantime wanted to get this checked in.

You may want to make some mods.  I have been trying to look at the changes you 
make to my patches to see if they are stylistic things that I can start doing 
to save core maintainer's time on future patches.  Let me know if you see any 
glaring bugs/holes.  I plan on starting to work my way through each of the 
format types and submitting another patch each time I complete an image format.

As I move forward, I have a few outstanding questions that maybe maintainers 
can answer:
1) can the HDF5 library used by Matlab read and write HDF4 files also?  I know 
that HDF4 and HDF5 are somewhat different conceptually, so I wasn't sure.  
*Magick no longer has HDF support (since 2002), so I wasn't sure if I will need 
to make libhdf4 a Matlab dependency also to support the imwrite HDF4 
compatibility.
2) I sent an email to the maintainer's list about a week ago asking about 
testing facilities within the Octave build system.  I know tests can be written 
within m-files and cc files, but they usually seem to be very short tests.  To 
make sure the imwrite/imread facilities work properly, I expect I will need 
more than a few lines of code.  In fact, it would be nice to be able to have a 
bunch of test images in a testing directory somewhere and corresponding MAT 
files to compare against after loads and writes.  I will also want to use the 
*NIX "file" utility and the output of *Magick utilities to check files after 
they are written out to make sure parameters and data were set properly.  Also, 
along the line of the testing, as I was looking at putting huge sets of tests 
at the end of .cc and .m files, I was wondering if it makes sense to strip 
tests from these files?

John Swensen

Attachment: magick_parmframework_plusgif.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]