realbasic-plugins
[Top] [All Lists]

Re: Templates and other questions

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Templates and other questions
From: Phil M <phil at mobleybros dot com>
Date: Fri, 14 Jul 2006 08:51:55 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <B7458FB5-9811-4175-B710-0A4992504AE4 at mobleybros dot com> <EE0EEE94-B5BD-483C-917E-042C67D67244 at realsoftware dot com> <9CED32A5-576D-4482-AD91-8321A09856A9 at mobleybros dot com> <8EFEF6B5-14A6-4ED3-9206-0CB987A80C6B at einhugur dot com> <9888A66B-EECD-4A66-BB2A-459C18316942 at mobleybros dot com> <44B76348 dot 4080207 at einhugur dot com>
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>


<Prev in Thread] Current Thread [Next in Thread>