From: Hezekiah M. C. <hc...@at...> - 2008-05-29 20:17:06
|
Here is a small revision to the previous plimage patch(es). The only internal change vs the last patch I posted is that plimage and plimagefr now save and restore the color palette 0 color in use before they are called. The major difference between this patch and the last I posted to the list is that I have updated the C example 20 to illustrate the functionality of plimagefr. Two new pages are added to the example: - A cap on the dynamic range in an image plotted by plimagefr. This gives the image a saturated look. Any values smaller than 25% of the maximum value in the image are painted black, and any values larger than 75% are painted white. - A distortion example using plimagefr. The example gives the image a paint-stroke look. This was not particularly intended, but the end result is interesting. Here is the pngcairo output of the (a) original plimage plot, (b) the saturated plimagefr plot and (c) the distorted plimagefr plot: a) http://0ok.org/images/plplot/plimage-normal.png b) http://0ok.org/images/plplot/plimagefr-saturated.png c) http://0ok.org/images/plplot/plimagefr-distorted.png The description of the changes to the plimage internals by this patch are copied below from my previous email. > Several updates have been made to the PLplot Subversion source tree > since I submitted my previous patches. Here is an updated version of > my coordinate transform support in plimagefr patch which should apply > cleanly against the latest PLplot SVN revision. > > The changes introduced are: > - Comment out the dev_fastimg rendering path - No code is removed, > just commented out. > - Add coordinate transform support to plimagefr (same structure as in > the plshade functions) > - Update api.xml with the above changes > > Some code was hoisted out of plimagefr and back in to plimage to clean > things up a bit. I also changed all of the comment to C style > comments /* */ rather than C++ style // to match the rest of the > PLplot code base. > > I ran some tests using example 20 compiled against PLplot 5.9.0 vs > PLplot svn + this patch using the xwin display device to see what sort > of difference the removal of the dev_fastimg rendering path makes. > The difference in speed seems minimal if it exists at all. This is on > a Pentium-M 1.7ghz laptop under Debian Sid. If there are any questions or concerns, please let me know. Thanks, Hez -- Hezekiah M. Carty Graduate Research Assistant University of Maryland Department of Atmospheric and Oceanic Science |