On Jul 14, 2006, at 5:26 AM, Björn Eiríksson wrote:
Yes you need platform specific code to Enter the Raw Pixel data, to
obtain RowSize, info if the bitmap is upside down (on Windows
systems). Then you can use that info in a fairly platform
independent way. And in the end you will need platform specific
code again either to clean up or to properly return the image
depending on platform.
Thanks guys. Not the answers I was hoping for, but you gotta do what
you gotta do. Also, I have been reading the Plugin list archives
(back to Nov 2004 now), and I am learning a lot more about plugins
and how to work with Pictures. But of course, every little bit that
I learn about, there are more questions. =)
One of the functions that I would like to do is a Picture duplication
-- where in REALbasic there is an exact data duplication of a picture
without any references to the old picture. This could be very useful
in writing an Undo history for an image editor. I was thinking that
it might be possible to create a new REALpictureDescription struct
and duplicate the "pictureData" using memcpy()... the problem being
that I don't know the size of the data. But now that I am thinking
about it, it would make since that even this approach would not work
since there are bound to be pointers into other blocks of data such
as the Mask and Vector objects if they exist.
I really wish that there was more content in the documentation and
more examples... the only Picture-based plugin source code that I
have been able to find is the PNG Utilities from Frank Condello.
Does anyone else know of other picture-plugin examples?
I must report a success which to you may seem insignificant, but to
me is a very big deal. I have actually successfully compiled a
plugin (Carbon) which extends the Picture class with a single
property -- HasMask() where the source code for this function is simply:
Boolean HasMask(REALpicture thePict) // REALobject instance
{
return (REALGetPictureMask(thePict, false) != NULL);
}
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>