Developing filter plug-in: having trouble storing image buffer in the registry
Hi guys, I'm new to plug-in development and having a bit of trouble with storing information to the photoshop registry. My plug-in has two buttons, "capture" and "apply". When the capture button is pressed, the filter needs to grab whatever image data has focus. Then the user would give a different image focus, run the filter again and press "apply", transfering information from the captured image to the new image. The problem is that filter memory is wiped between executions so I need to save the captured image to the registry (I think anyway, please let me know if there's anything easier I could be doing).
Anyway, I'm modifying the dissolve example from the SDK, I'm in DissolveRegistry.cpp
In dissolve.h I define an image buffer and it's length
Ptr transferBuffer;
int32 transferBufferLength;
Then in DissolveRegistry.cpp I try to write and read this information as follows
//WRITE BUFFER
err = descriptorProcs->PutInteger(descriptor, keyTransferLength, gData->transferBufferLength);
if (err) goto returnError;
err = descriptorProcs->PutData(descriptor, KeyTransfer, gData->transferBufferLength, gData->transferBuffer);
if (err) goto returnError;
//READ BUFFER
err = descriptorProcs->GetInteger(descriptor, keyTransferLength, &gData->transferBufferLength);
if (err) goto returnError;
err = descriptorProcs->GetData(descriptor, KeyTransfer, gData->transferBuffer);
if (err) goto returnError;
It seems to write okay (by okay I mean it doesn't actually throw an error), and the buffer length seems to be working okay (unless I'm missunderstanding my debugger). When I try to read the buffer though, I get a "bad pointer" error. I guess I don't understand how the PutData function works, does it not set the pointer to the buffer I saved? Does anyone have any example code for how to do this correctly?
Sorry if this code is terrible. I have almost no experience with this sort of thing and I can't find any documentation. Any help would be much appreciated!
Kindest Regards,
Eric
You need to create space to copy the data before the GetData call.
Something like
gData->transferBuffer = new char[gData->transferBufferLength];
Similar Messages
-
Im having trouble with my volume. The only time i can hear my iphone's sound, is when i have heaphones plugged in. How do i fix this
Hello Malique2k14,
Thanks for using Apple Support Communities.
For more information on this, take a look at:
iPhone: Hardware troubleshooting
http://support.apple.com/kb/ts2802
No sound or distorted sound from speaker
Receiver issues
Best of luck,
Mario -
Having trouble burning images to cd, get error code 0x8002006E - what is it?
Hello all, I am having trouble burning images to a cd, I get error code 0x8002006E - what is it? I have an older MacBook Pro, OSX 10.6.8. Help!
You might also try SMC and PRAM resets:
http://support.apple.com/kb/ht3964
http://support.apple.com/kb/ht1379
And you might try deleting the "com.apple.finder.plist" in your Library.
Ciao. -
im having trouble connecting my macbookpro to the tv. im using a mini display port to hdmi adapter, when i switch tv/video to hdmi on the tv nothing pops up, and i dont have the arrangement tap on the display settings, please help!
I've found that the order of operations, so-to-speak, can be important when hooking up mini display port to HDMI. I have the most success with the following operations in this order:
1) Plug HDMI cable into mini displayport adapter (the cable should not be plugged into either the TV or the computer at this point)
2) Plug the mini displayport end of your new super-cable to the computer.
3) Plug the HDMI end into your TV.
4) Switch inputs on your TV to the proper input.
5) If still nothing on the TV, try a different HDMI port on your TV.
Hopefully this helps! Good luck. -
Any one else having trouble w/Safari frequently crashing the last week or two? Any cures? Mine is 4.1.3 Thanks
Most Safari problems are due to unsupported plug-ins, add-ons, custom toolbars, or "input manager" software, some of which you may not know you have acquired.
You best bet is to ask in the Safari forums:
Safari
Save a crash report and post it in that forum. People there are amazing at decoding those reports and finding the culprits, -
Hi all, Since I updated to Mavericks I am having trouble with Safari showing all the buttons/clickable options, but they are gray and will not work. Specifically, the Trash Can/Delete and the "Move to" folder button simply do not work. Any ideas?
Please post a screenshot that shows what you mean. Be careful not to include any private information.
Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply. -
is anyone else having trouble setting up messages with the new mountain lion software? I keep getting a notification that i cant sign in and it is saying, check network connection and try again, but i have full wifi bars, thanks, Justin
Install this to get X11 functionality back in 10.8
http://xquartz.macosforge.org/landing/
Worked great for me and others.
Jerry -
I'm having trouble restoring my ipod. The software starts to download but it stops saying that there is a connection problem when there isn't. What can I do?
Disable the computer's security software during the download and update.
-
I've been having trouble on my 4S since the update. If I restore it, will I lose my notes and photos?
Hi,
Please clear your temp folder and delete the files. After that download the creative cloud desktop application from the link below:
Creative Cloud Help | Creative Cloud for desktop
Regards,
Sheena -
How do I cancel the distance between the numbers?
I'm having trouble copy phone numbers from the phone book and send it via SMS
This problem I've found in the Arabic language, numbers appear in reverse
Please help
System 6.0.1MPEG-4 should not be used in FCP unless it is converted first or optimized in the application.
Trash your preferences. Trash your project render files. Switch off background rendering. Do not re-render. Export your projects.
Ignore the last frame and first frame indicators. -
Hi, I having trouble trying to connect to the wifi, I know the passwords and checked with others divises but with the mac os x 10.7.5 mac os x lion is not working
One of the wifi connections said "time out" or did not recongnise the passwordHi andrea122,
Thanks for visiting Apple Support Communities.
If you're not able to connect to Wi-Fi on your iMac, the troubleshooting steps in this article can help:
Wi-Fi: How to troubleshoot Wi-Fi connectivity
http://support.apple.com/kb/HT4628
Regards,
Jeremy -
Re: Any one else having trouble w/Safari frequently crashing the last week or two? Any cures? Mine is 4.1.3 Thanks
Please post a copy of the latest crash report.
Go to your Applications Folder and open your Utilities Folder. Open the application Console.
In the left-hand column, click on Crash Reporter.
Click on the small triangle under Crash Reporter in the l/h column and they will all be listed.
Scroll down to the latest Safari report and click on it.
Now click on the r/h column (which now only shows THAT crash report and then Command-a to copy it all.
Come back here and Command-v it to post it here! -
I'm having trouble finding carton hd on the app store
I'm having trouble finding carton hd on the App Store
Just a guess, are you looking for this:
https://itunes.apple.com/us/app/cartoon-h.d-wallpapers/id535109714?mt=8 -
Has anyone else been having trouble with safari ever since the update? I have restarted several times, it still doesn't work.
Greetings Blueleoapple,
After reading your post, it sounds like you are experiencing an error with Safari. You may want to consider resetting your device, which is different from restarting. This article provides detailed instructions for Restarting, and Reseting:
Restart or reset your iPhone, iPad, or iPod touch - Apple Support
How to restart
Press and hold the Sleep/Wake button until the red slider appears.
Drag the slider to turn your device completely off.
After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
How to reset
You should reset your device as a last resort and only if you can't restart it.
To reset, press and hold both the Sleep/Wake and Home buttons for at least 10 seconds, until you see the Apple logo.
Thank you for contributing to Apple Support Communities.
Best,
Bobby_D -
Anyone else having trouble with FCPX crashing after the OSX update?
Anyone else having trouble with FCPX crashing after the OSX update? It NEVER crashed until the update. The night before last it crashed 20 times in 45 minutes. I can't finish my project because of it.
Retina, Mid 2012
Processor 2.3 GHz Intel Core i7
Memory 8 GB 1600 MHz DDR3
Graphics NVIDIA GeForce GT 650M 1024 MB
Software OS X 10.9 (13A603)therealamaru wrote:
I don't understand the question. I am simply editing.
There are some patterns of crashes that suggest possible causes and fixes; some users report crashes when FCPX is in the process of loading; others while importing/exporting, etc. Asking to narrow the list of possibilities.
Suggest starting with three things:
1) Update the software from the APp Store if need be.
2) Trash preferences.
3) Repair permissions.
Russ
Maybe you are looking for
-
One apple ID could install how many computer?
If i purchase new mountian, Could I install 4 computers - all belong to same family.
-
Hi I just downloaded the latest version of Onyx (Leopard version, I am running OS X 10.5.1), and I ran the verify start up volume. It said it needed to be repaired, so I ran OS X's disk utility and verified the startup volume. I got the following mes
-
Error while integrating Struts1.2.9 with Hibernate on WEBLOGIC 8.1 sp2
Hi, I am trying to use Hibernate in my application but while integration struts with Hibernate i m getting the following error <Error> <HTTP> <BEA-101216> <Servlet: "action" fail ed to preload on startup in Web application: "DefaultWebApp". javax.ser
-
What happened to third party apps for OSX 10.5 ?
A case most curious ! I cant seem to locate any third party apps for OSX 10.5 when clicking on the third party apps link on the apple downloads page ! The link doesnt seem to work any longer - any idea as to why ? Thank you in advance
-
RHEL-4.4 Advanced Server - ASM or ASMLib?
Hi, I am currently running RHEL-4 AS (Nahant) Update 4 for Linux x86 and going to make first-time, clean Oracle 10g R2 (10.2.0.1.0) installation. I have 4 physical SATA disks (120 GB each) attached to Promise SATA TX4 Controller, each disk to its own