Sunday, March 28, 2010

regarding listener.log file

Hi,



The listener.log file is showing the following code snippet.But when I put this code to my source file (Automation Plugin), it is giving error as 'FullPathToAlias' unrecognised symbol.



// Move this to the top of the routine!

Handle aliasValue = NULL;

FullPathToAlias(''C:\Test.jpg'', aliasValue);



Do I have to include any header file? Does any one have any idea? I am just wanting to dispaly an image preview on dialog box(Automation plugin).



Please give any idea how can I get the image referrence for the first time from the Hard Disk?



Can anyone help me out.....................?



Thanks and Regards
regarding listener.log file
FullPathToAlias is defined in PIUIFile.cpp as following:



void FullPathToAlias(char* fullPath, Handle%26amp; aliasValue)

{

aliasValue = NULL;

#if __PIMac__

AliasHandle aHandle = NULL;

// this could error with fnfErr, file not found error, ignore

(void) sPSAlias-%26gt;MacNewAliasFromCString(fullPath, %26amp;aHandle);

aliasValue = (Handle)aHandle;

#else

Boolean oldLock;

Ptr address;

aliasValue = sPSHandle-%26gt;New(strlen(fullPath)+1);

if (aliasValue != NULL)

{

sPSHandle-%26gt;SetLock(aliasValue, true, %26amp;address, %26amp;oldLock);

strncpy(address, fullPath, strlen(fullPath)+1);

sPSHandle-%26gt;SetLock(aliasValue, false, %26amp;address, %26amp;oldLock);

}

#endif

}



If you still got problems, I can send the code-snippets I use for loading %26amp; saving a file.
regarding listener.log file
Hi Marc,



Thanks for your reply. I have found the file PIUFile.cpp. Now My plugin is working fine and I have opened the desired file in photoshop through my plugin.



Thanks once again.



But I have one more problem and rather it is big for me because I am trying to solve it for the last one week. I have made a automation plugin and I want to display image from a folder to my plugin Dialog as a thumb nail image (just like Picture Package... plugin) but not doing any thing with image just want to placed it on the new document behind the plugin dialog. I am not able to get the referrence of the image on my dialog box.



Can you help me out regarding this problem. Also there is not available any source code or a little help for Automation Plugin (Filter plugin source code are only available).



Thanks and Regards,

Mmh, so you're trying to do something like a file-preview?

I don't know if this is possible, mainly because at the moment

I can see no way getting any image data before you've loaded

the image in photosphop (with just using the sdk and not any

mac/win api)

If you're developing only for windows targets, you might want to

try to develop a mfc type plugin like the ''mfcplugin'' from the filter-

plugin examples. It does give a preview of the result of an filter

applied to an image, so I'd guess you can change this with the help of the win-api to preview some picture file. For MFC there are also some

nice solutions on codeproject you could easily integrate in your plugin:



a thumbnail control:

http://www.codeproject.com/miscctrl/thumbnailctrl.asp



and a picture control:

http://www.codeproject.com/cs/miscctrl/ScalablePictureBox.asp



Otherwise the ''dissolve''-plugin from the filters example is for mac and win os's and offers also a preview (of a filter application), maybe this will give you some more insight.

No comments:

Post a Comment