Tuesday, December 6, 2011

Some progress on modeless dialogs...

Hi all,



The last couple of weeks I've been trying to get floating tool windows into photoshop. I'm trying a lot of things and came across this:



Load up the ''FrameSelect'' example project and change the DoUI() function to this:



//-------------------------------------------

SPErr DoUI ()

{

SPErr error = noErr;



//int item = kDNoUI; // Error value.



SaveParameters(); // Save our parameters, just in case.

if (sADMDialog != NULL)

{

sADMDialog-%26gt;Create

(

gPlugInRef,

''FrameSelection'',

kDialogID,

kADMTabbedFloatingDialogStyle,

DoUIInit,

NULL, /* No user data */

0//InOptions = 0

);

}



//if (item != kDOk_button)

// {

// error = 'STOP'; //'STOP' = kUserCancel;

// RestoreParameters();

// }



return error;



}

//-------------------------------------------



The sADMDialog-%26gt;Create functon replaces the sADMDialog-%26gt;Modal function that was there. This is all in the standard PS SDK, just had to go hunting through some header files. When yo run this code you sort of have a floating tabbed tool window. There are still some odd thing that happen but this might get some people on the right track.



G
  • help blackheads
  • ADM Tracker Suite and Short Cut Keys

    Hi all,



    Has anyone had any experience with the Trackers suite? Specificially if there is a way to turn off/deactivate short cut key commands getting to the main photoshop window. I have some text boxes in a dialog which works fine except that key presses are also registered by photoshop and trigger short cut commands when I type into the text boxes.



    I've just started looking through the doco but can't find anythng specific.



    TNKS!



    G

    Tools required for Win 64 build

    What tools are required to build a 64 bit Windows plugin?
  • migrating existing portal
  • SDK makes me to call the feature of...

    Dear sir,



    #I'm sorry for my poor English

    #and the lack of my knowledge about Photoshop SDK.



    I use Photoshop CS2 on WindowsXP.



    As you know, we can start Photoshop with cmd.exe like a following:



    C:\%26gt;C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe



    First, I would like to know whether it is possible to

    apply one 'Filter' like a 'AddNoise' without starting Photoshop or not.

    For example:



    C:\%26gt;C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe -from a.tif -to b.tif -filter addNoise



    (*)a.tif is source image, b.tif is destinate image.



    I beleive that it is NOT possible...



    Next, I would like to know whether Photoshop SDK dose make me to execute

    the feature of Photoshop from other application or not.

    Ohter application is my custom software programmed by C++.

    i.e. I would like to call the feature of Photoshop as library function

    without starting Photoshop.



    JavaScript Object makes me to execute the feature of Photoshop,

    but I need to start Photoshop.exe for this.



    I would be happy if someone tell me any informations about it.



    Again, I'm sorry for the lack of my knowledge about Photoshop SDK

    from the bottom of my heart.



    Best regards,



    --katsu
    SDK makes me to call the feature of...
    Katsu,



    Photoshop can be used this way using automation. The automation SDK is

    included on the Photoshop cs2 CD.
    SDK makes me to call the feature of...
    Photoshop will always need to run. It always does the work. So you

    might like to think of your question in a different way: can I have

    Photoshop do the work without seeing anything on screen? I don't have

    an answer for you.



    Aandi Inston

    Curvemeister,



    Thank you very much for your reply.

    I didn't know well the Photoshop's automation.

    So, your infomation is very helpful for me.

    Again, thank you very much.



    Aandi Inston,



    Yes, my question is:



    can I have Photoshop do the work without seeing anything on screen?



    Now, I download Photoshop's SDK and read the manual pdf of

    Photoshop API and Automation.

    Though I'm not sure, I guess that I can do so. :)



    Again, thank you very much for your kindness.



    Best regards,



    --katsu

    Aandi Inston,



    About my question,



    %26gt;can I have Photoshop do the work without seeing anything on screen?



    After I have read SDK documentations,

    I find that I can NOT do so...

    Instead of it, I guess that Photoshop can be hidden to task bar.



    Anyway, thank you very much for your infomation.



    --katsu

    Format plug-in: Setting file...

    Hello,



    I am currently writing a plug-in to import a proprietary image format into Photoshop. The people who will use this plug-in believe it would be useful to have some file information displayed in the File Info dialog.



    The problem I'm running into is finding the functions necessary to set these properties in the File Info dialog, as currently they are all entirely blank.



    As a simple example, if I wanted to have the Document Title, Author, Description and Keywords read ''Hello, world!'' after I've read in an image, what functions would my plug-in have to call to set each of these text fields?

    Is there a struct that my plug-in needs to modify, or a group of get/set functions to change these properties?



    Any information would be extremely helpful, as documentation on the subject is very difficult to find in the SDK.



    Thanks a lot!



    Jack
    Format plug-in: Setting file...
    You're in luck: this is what my DITABIS File Format plugin does. You can inspect the GPL code @ http://www.telegraphics.com.au/svn/ditabis/trunk/



    The important code:



    %26gt; pb-%26gt;propertyProcs-%26gt;setPropertyProc(kPhotoshopSignature,propCaption,0, 0,h);



    Contact me for more help if you need to.
    Format plug-in: Setting file...
    Thanks for your help, Toby.

    I've got an idea of how to configure the properties at this point. Simple properties work now, but I am still running into a bit of trouble setting complex options such as the Caption tag. I create a handle, populate it with the null-terminated string for the caption, and then I use setPropertyProc to link that handle to propCaption. The code would go something like this:



    %26gt;Handle h = sPSHandle-%26gt;New( captionLength );

    %26gt;if( h )

    %26gt;{

    %26gt; Boolean locked;

    %26gt; Ptr p;

    %26gt;

    %26gt; sPSHandle-%26gt;SetLock( h, true, %26amp;p, %26amp;locked );

    %26gt; // In here, use memcpy to copy a typical C string into p

    %26gt; sPSHandle-%26gt;SetLock( h, false, %26amp;p, %26amp;locked );

    %26gt;

    %26gt;sPSProperty-%26gt;setPropertyProc(kPhotoshopSignature,propCaption,0,0,h);

    %26gt;}



    Basically when I run my plugin and open a file, the Description field is still blank, as it was before I tried to populate the fields.



    Is there something wrong with my approach? Incidentally, I also encounter the same problem when I use the same property and handle suite methods that you do (FormatRecord-%26gt;PropertyProcs and FormatRecord-%26gt;HandleProcs instead of sPSProperty and sPSHandle respectively). From looking at other available code online, I'm assuming that there isn't a difference in behaviour. Please correct me if I'm wrong! :)

    Sorry, the formatting ate a lot of my newlines and made my code fairly unreadable. Here is that code section, again:



    %26gt; Handle h = sPSHandle-%26gt;New( captionLength );

    %26gt;

    %26gt; if( h )

    %26gt;

    %26gt; {

    %26gt;

    %26gt; Boolean locked;

    %26gt;

    %26gt; Ptr p;

    %26gt;

    %26gt;

    %26gt; sPSHandle-%26gt;SetLock( h, true, %26amp;p, %26amp;locked );

    %26gt;

    %26gt;

    %26gt; // In here, use memcpy to copy a typical C string into p

    %26gt;

    %26gt;

    %26gt; sPSHandle-%26gt;SetLock( h, false, %26amp;p, %26amp;locked );

    %26gt;

    %26gt;

    %26gt; sPSProperty-%26gt;setPropertyProc(kPhotoshopSignature,propCaption,0,0,h);

    %26gt;

    %26gt;}

    It's quite a while since I wrote that code, but you can see from the source code I linked that propCaption is not a string - it's IPTC formatted data. Look at this file to see how I construct it:



    http://www.telegraphics.com.au/svn/ditabis/trunk/metadata.c



    Some links from google...



    * http://www.controlledvocabulary.com/imagedatabases/iptc_naa.html

    * http://libiptcdata.sourceforge.net/docs/iptc-overview.html

    Thanks so much, Toby! Your code really helped me out, and now all the properties I need display properly.



    Cheers!

    Most welcome, Jack - glad I could help.

    Photoshop CS4 SDK and 64-bit Windows

    Will there be an SDK for 64-bit Windows or do we just use the CS3 SDK and compile plug-ins in x64 mode?



    Does CS4 support both 32-bit plug-ins and 64-bit plug-ins when the 64-bit version of Photoshop is installed?
    Photoshop CS4 SDK and 64-bit Windows
    That's a very good question, Tom.



    I'd be interested to know how I can make my plugins run on 64-bit CS4.



    http://telegraphics.com.au/sw/
    Photoshop CS4 SDK and 64-bit Windows
    Well, now that Photoshop CS4 has released, we have some answers. Yes, there is an SDK at http://www.adobe.com/devnet/photoshop/sdk/. Yes, both 32-bit and 64-bit environments are supported on Vista-64. This is done by installing 32-bit and 64-bit versions of Photoshop.



    Nicely done!

    From what I can see the plugin interface is virtually identical between 32 and 64 bits, the code just needs a rebuild in many cases. Of course, design changes may be in order if a particular plugin needs 64 bit capability to exceed boundaries.



    -Noel

    PSD per-layer metadata

    I would like to add custom metadata fields to layers and layer sets within PSDs and I can't see if this is even possible. XMP metadata seems to apply to the file level only, and I can't find anything in the CS3 SDK or scripting references related to what I'd like to do.



    Does anyone have any pointers?



    Thanks, Ian
    PSD per-layer metadata
    %26gt; Does anyone have any pointers?



    Patience...



    This functionality does not exist in CS3, but you could always co-opt an

    existing metadata field to map metadata to layers. This would require that the

    layer names be unique so that the information would persist, but it is possible.



    -X

    --

    for photoshop scripting solutions of all sorts

    contact: xbytor@gmail.com
    PSD per-layer metadata
    Thanks xbytor, that's certainly an approach to consider. One piece necessary for that to succeed for me would be that my plugin is notified when layers or layer sets are modified in certain ways, for example if a layer has metadata in the parallel data structure and the layer is copied, I need to copy the metadata in real-time too. I haven't investigated much, but it seems like the Listener example plugin is going to help me out here.
  • help blackheads
  • Add image resource to the ''.r'' file

    Hi,

    I'd like to embed small (16x16 pix) image resources (ex. png, jpeg) into the ''.r'' file. How can I do this?Add image resource to the ''.r'' file
    You can use the 'read' command. See ''Building and Managing Programs in MPW'' for a complete reference to Rez:

    http://developer.apple.com/tools/mpw-tools/books.html#Building
  • domain names
  • Mac- PS CS2 font issue (probably)...

    Hi all!-

    I just rearranged all of my fonts (using font agent pro) and now, any time I do ANYTHING, I get ''Could not complete your request because of a program error'' I've never had a problem with CS2- and I'm thinking it must be a font that is now turned off that it needs to access. Is there a list of fonts available that PS needs?

    I can manually turn those on- if I just knew hat they were.

    Or maybe it's something completely different.

    Any help is greatly appreciated!

    PSD CS File Format Documentation -...

    Hi,



    I'm trying to find the PSD file format documentation that details the byte order of PSD files for Photoshop CS1,2 and 3.



    I'm trying to write a PhP parser to modify Text Strings within Text Layers of a PSD file.

    This bit i can manage, I can find the layer, and find the text string i want to change, but changing it renders the PSD file unopenable, i assume because somewhere there is a block detailing the byte length of the Text String within the Text Layer??



    So i'm trying to figure out where this is in the layer, and if anything else needs changing when i change the Text String within the text layer.



    Is this actually possible as well, or am i wasting my time because it is compressed into the image data aswell?



    Any info would help.

    Thanks
    PSD CS File Format Documentation -...
    Hi Simon,



    If you're interested in a script that does what you're trying to do, then contact me by email and I'll provide you some further info.

    making photoshop6 work on tiger

    has any one got ps6 to work on tiger?
    making photoshop6 work on tiger
    %26gt;has any one got ps6 to work on tiger?



    Are you using the Photoshop SDK, a tool for programmers?





    Aandi Inston

    Storing generic byte stream to Registry

    I see that I can store integers, text strings, etc. to the Photoshop registry.

    I need to store a large (sometimes multi-MB) stream of data to the registry.

    Can this be done?



    I won't know the size of the data stream until after the filter is applied (the user interacts with a dialog box that will determine how much data is generated).



    Is there a registry command for storing large (variable-sized) sets of data?



    Thanks.



    Matt Rhodes

    Zaxwerks, Inc.
    Storing generic byte stream to Registry
    I would recommend writing a file and storing its location to the

    registry. If you take something designed to store a few KB of

    information and pump megabytes into it, performance isn't the only

    thing likely to suffer.



    Aandi Inston

    Developing brushes

    Hey, I'm new to the SDK and I'm wondering what is the best way to add additional brushes to Photoshop? Is there some skeleton code one can use that offers basic brush functionality? (resizing, opacity etc)

    I read somewhere that this was not possible but surely it can not be so...Developing brushes
    Hi, I'm brand new to the SDK so I can't answer your question, but I am looking for the same answer.
    The FAQ says:

    3.1.3 What can I not do with the Photoshop API?
    No non-modal plug-ins.
    No plug-in tools.
    No plug-in floating windows.
    No plug-in palettes.
    No plug-in brushes.
    No adding or changing menus.

    - ?! Which seems to make the SDK COMPLETELY USELESS to me. All I want to do was create a custom brush tip out of a full-color image instead of just grayscale so that it can take advantage of the brush settings like scatter, and angle jitter, and pressure sensitivity.

    I'll post if I find anything.Developing brushes
    Yes I agree, I think Photoshop is sub-par in this respect. I write a lot of tools for other art packages (3DS Max, Maya) and they have completely customisable UIs, so I can't see why Photoshop's SDK limits the creation of non-modal windows for your own tools.
  • help blackheads
  • lock file
  • Filter plugin kills interractive drag

    A customer just pointed out some unusual behavior in my windows filter

    plugin. After running the plugin, Photoshop is no longer able to do

    interractive dragging of pixel data.



    It's just the interactive drag that is broken. The operation completes

    normally, with the pixel data jumping into place after the mouse button is

    released. This affects floating selections, and moving of layer data with

    the move tool. Restarting Photoshop clears up the problem.



    Any ideas what I could be changing in Photoshop to make this happen?

    ReadPixelsFromLevel fails with error...

    I've got a problem with certain calls to ReadPixelsFromLevel failing with an error code 'MRAP'. This error is not declared anywhere in the SDK headers. Has anyone seen this before and knows what it means?



    The error only happens in one situation: the image must be in 16-bit mode (any color space), and I request a quite small image pyramid level (bounds in the order of 100x100 to 1000x1000 pixels). But although it's a small level, it's not the smallest available, so that is not the trigger either.
    ReadPixelsFromLevel fails with error...
    MRAP is PARM backwards - this is a byte swap issue.



    Re the actual error, I've found the channel op suite to function somewhat

    differently in 16 bit mode. Make sure the source rect does not extend

    outside the image rectangle.
    ReadPixelsFromLevel fails with error...
    AH! Well spotted. Thanks, Curvemeister.



    Going to hunt this little bugger down now.

    This is plain weird. ReadPixelsFromLevel on 16 bit images fails for all levels but level 0. I'm quite certain that PixelMemoryDesc is set correctly, and the bounds I ask for are coming directly from GetDataBounds() for the respective level.



    This all works wonderfully in 8bit and 32bit modes. Only 16bit seems to behave badly.



    Example:



    An image of 640x513 returns for level 1 bounds (0, 0, 320, 257).



    ReadPixelsFromLevel is called with these parameters for this case:

    PixelMemoryDesc=(rowBits=5120, colBits=16, depth=16, bitOffset=0)

    buffer of size 164480 bytes (640 bytes per row)

    bounds=(t=0,r=320,b=257,l=0)

    level=1



    And it returns PARM error. I don't get what I'm doing wrong here.

    I found the solution myself. The key is that the image pyramid can even change bit depth for lower levels. Turns out for my 16 bit images, only level 0 had a depth of 16 bit, all others only 8 bit.



    Note to self: always call GetDepth() even if you think you know what the depth should be.

    Photoshop Type Library Error

    Hi,



    Anyone can tell me the cause of this error ''Additional information: QueryInterface for interface PhotoshopTypeLibrary.IPhotoshopApplication failed.''.



    I'm using photoshop cs3 type library in VB.Net. Below is my codes



    Imports PhotoshopTypeLibrary



    Sub Main()

    Dim oPhoto As PhotoshopApplication

    Dim gControl As IActionControl

    Dim ophotoDoc As IAutoPSDoc



    oPhoto = New PhotoshopApplication

    gControl = oPhoto.MakeControlObject



    End Sub



    I'm using this code in CS2 but when I installed the CS3 the code is not working. Please help me to solve this error. Thanks in advance.



    Thanks



    Regards,

    Buddy

    Trying to figure out bug I can't...

    I've release a freeware plug-in but one person is seeing an error message in Photoshop CS2 (Windows XP, 3GB RAM) and therefore can't use the plugin.

    ''Could not complete the White Balance / Highlight Recovery v.1.0.2 command because of a program error.''

    http://www.pbase.com/image/101560453/large.jpg



    The user can run other 3rd party plugins. I have a CS2 / WinXP /512MB RAM machine and can't reproduce it.


    White balance plugin download page



    I tried making a version that would report the specific *gResult (int16 result) error code but it seems that the plugin doesn't even get that far.



    Any ideas would be appreciated!
    Trying to figure out bug I can't...
    Why don't you go one small step further than freeware: open source the code and then we can all take a look at the problem.



    If you need a public repository for it, you're welcome to join my plugins at https://www.telegraphics.com.au/fisheye (of course as open source you retain your copyright no matter where the code is served).
    Trying to figure out bug I can't...
    Hi Toby,



    Thanks for the reply and I appreciate you suggesting that I turn the plugin open source. I have been digesting the idea (and am still digesting it)... are there any commercial benefits for doing so? Would other people even be interested in taking that open source code? (Though such code might be useful for those wanting to create their first plug-in as the SDK examples aren't intended to have bells and whistles like a bigger preview you can drag around and zoom.) I've not figured out any commercial benefit.



    2- As far as my problem goes, it seems that changing my compiler settings (Visual c++) to something ''normal'' did the trick. I don't know which settings did the trick though.

    Figured it out: I enabled SSE2 instructions, which won't work on older processors.

    Post Ps CS Color Picker issues

    As of Photoshop CS (I believe) my windows filter plugin's color picker no
    longer works correctly.

    The picker comes up, and the dialog controls, including the buttons, radio
    buttons, and numeric fields function correctly. Clicks on the client area
    of the picker, including the square color area and vertical slider, just
    generate a beep.

    If I go back to earlier versions of Photoshop, the picker works fine - it's
    just for CS and later. Any thoughts or guesses are welcome.
  • transfer file
  • [MAC CS2] Save a document in jpeg format

    Hello,



    I'm new in the PhotoShop SDK !



    I would like to save an open document in JPEG format but I don't know how I can do !



    In this moment I use FrameSelect sample code to understand SDK.



    Could you help me ?



    Thanks
  • help blackheads
  • BrowseUrl on OSX?

    I'm writing a plugin that makes use of the BrowseUrl proc from the Suite PEA GetFileList suite. It works perfectly fine on Windows XP/Vista, but does nothing on OSX 10.4. I've ran the code through the debugger and the call doesn't return an error, so I'm at a loss. Does anyone have any experience with using this on OSX?



    Regards,

    Ervin

    COM, Photoshop.Application,...

    Hi,



    I make a script to getting the active document in Photoshop:



    VBScript ''testps.vbs''

    ----------------------------------

    For iCounter = 1 to 100

    Set PSObject = GetObject(, ''Photoshop.Application'')

    Set ActiveDoc = PSObject.ActiveDocument

    WScript.Echo ActiveDoc.Fullname

    WScript.Sleep 500

    Next

    ----------------------------------



    run: ''cscript testps.vbs''



    After running a script, Photoshop begins to stall. The cursor mouse constantly being replaced at the icon clock.



    I think that this is a bug. The programmes of Microsoft Office (and many others), there is nothing like this. With something you can do with this?

    What can I do?



    Thanks!

    (re-post) plugins on Vista - any...

    I asked about this a while back but received no replies:



    With the arrival of the WOW that is Vista, has anyone noticed new support issues? From my own suite of (open source) plugins, I receive zero support contacts from MacOS or XP users, but as soon as Vista arrived I began to hear about two problems:

    * ''plugin entry point could not be found'' (apparently helped by restarting Windows and reinstalling the plugin)

    * a higher incidence of out of RAM errors.



    Has anyone else seen these issues? Are there any workarounds? Is anyone doing special Vista builds of their DLLs? If so, what's different?



    I hope that ''commercial secrecy'' doesn't prevent a discussion of this issue.
    (re-post) plugins on Vista - any...
    The main thing I'm seeing is installation issues, new problems in two

    areas.



    1) registry entries not being written - this affects some systems, and not

    others. The user is able to fix this by running a .reg file that I send

    them.

    2) In some cases, the installer is unable to copy to Photoshop's plugin

    folder. This seems to affect some systems all the time, others not at all.

    The user is able to fix this by manually copying.
    (re-post) plugins on Vista - any...
    Sounds like the hand of UAC.



    Aandi Inston

    I don't use an installer, so I've never seen problem (2). I never write registry entries, either.

    I was having problems with Toby's .ico plugin extension. I kept getting a ''entry point'' error every time I tried to use the extension. A re installation of the plugin and a restart of, my computer, fixed the issue it seems.



    No idea whats causing it but apparently its Vista related only.

    EnableInfo grammar

    Does anybody have any documentation about this? It seems to be very powerful, and I see people using things like PSHOP_ImageWidth that aren't referenced in any of the sample code, but I can't figure out how they found out about it. The section in the so-called documentation says ''Not yet created''. Nice, Adobe. Glad to see you're tying up all the loose ends before you ship your product.

    Thanks,
    AaronEnableInfo grammar
    Found it - it's in the PDF of the Plug-in Resource Guide, but not in the HTML docs.

    AaronEnableInfo grammar
    Loose ends in developer docs? Never!!
  • take advice fron me
  • Calling a plugin from script

    Hi all,



    Is it possible to call the plugins from a script written for Photoshop like calling an external object?



    Thanks in advance,

    Sailu

    How to get the pixel data so as to work...

    Hi all,



    I am trying to write a plug-in that will crop and scale the image, edit the selection in the image document based on image data. For this purpose I need the pixel data of the image. How to get the image data as different pixels and what is the data structure used to store this data?



    Assumption: No layers i.e., only background



    Thanks in advance,

    Sailu
    How to get the pixel data so as to work...
    If you want to edit the image inside a selection, a Filter plugin can do that. See the SDK docs.



    As for cropping and scaling, a Filter can't. Look into scripting or Automation? (I don't know anything about Automation plugins.)
    How to get the pixel data so as to work...
    Thanks Toby for the reply.



    I have a doubt about the filter plug in. Is it possible to get the whole image into the plug in even if there is a selection on the image?

    If it is, how?



    Thanking you once more,

    sailu.

    GetFilterRect() will return a Rect for the whole image (everything).



    If you SetInRect() to that (assuming that gFilterRecord-%26gt;input is the default / 1%26lt;%26lt;16), then that will give you the whole image (everything). The selection comes in as an additional plane.



    Take a look at the example code for ''Dissolve''. There is a function (csplanesfrommode or something like that) that will tell you how many planes are for image data and not masks or selection. set inLowPlane, etc. etc. to tell Photoshop which planes you want. If you ask for more than one plane at a time, the data will come in interleaved. e.g. RGBRGBRGB instead of RRRGGGBBB

    If you are writing a commercial plugin, use the channel port suites and

    work on the images in a tiled fashion to make efficient use of memory.



    If this is a personal project, and you just want the pixel data in a format

    that you can do calculations on, save the image in Photoshop raw format

    (unrelated to camera raw) and read the array of pixel values directly from

    that file. This is an easy way, for example, to get the image data into

    matlab.

    Hi all,



    I have a similar problem: I am writing an automation (no filterRecordInfo in sight) plugin and I am trying to display a preview of the whole current image in my plugin's dialog. How to access image data?

    I am trying to build a proxyview similar to the one in PoormanType example, but without filtering. Just a preview of the document.



    Thank you in advance!!



    Chaker

    The classic solution is to have two plugins, an automation and a filter, that communicate with each other; e.g. you run your automation, spawn the filter, get the image data, deal with it and then pass the result back to the automation. The other option is to show all your dialogs from the filter and then spawn your automation that will do the work. It all depends on how the actual work is split between the automation plugin (application and document level manipulations) and the filter (actual pixel data updates).

    Hi Ilya,

    Thank you for your post. In the plugin architecture you propose (automation + filter), do you have an idea about how to share the pixel data between the two plugins? I have found a post that gives details about how to get pixel data and show it using ADM components
    Matthew Hollingworth, ''ADM Color Managed Preview?'' #1, 22 Oct 2007 11:53 pm but it supposes that you have a filter plug-in.



    Again, does anyone knows how to preview the current image in a AUTOMATION plug in? This seems impossible.



    Thank you all for your help



    Cheers,

    Chaker

    It seems that Ilya is right. To have a preview proxy in an automation plugin, the only obvious way is to have a filter plugin aside. Hidden filter seems to be a good condidate. This post gives some details: http://www.adobeforums.com/webx/.59b4c7cc/0
  • help blackheads
  • PS CS3 Extended 3D Animation?

    In PSScene.cpp, there are routines to create animation keyframes.



    But, there are no coding examples in the SDK that use these routines, so I don't

    know exactly how they are suppose to work. I tried loading some animated Collada files

    into Photoshop, but nothing appears on the animation timeline.



    How exactly does this work? Can we actually animate a 3D mesh? Is this a type of

    vertex-based animation? Because I don't see any support for skeletal animation.

    How exactly does a PI3DKeyFrame struct reference a mesh or vertex? By ID, meshlist index, or by name?

    advanc...

    Hi,



    I have no Idea anymore. Please help.



    filterRecord-%26gt;advanceState() failed with errorcode filterBadParameters == -30100.

    inData is set, but outData is still 0 after calling advanceState().



    If I ignore this error message an proceed I'll see something like a high magnified version of the original pixels. filterRecord-%26gt;advanceState() is called for creating the preview image.



    All I could debug is that it must have to be an issue with the size of inRect or/and outRect.



    So my quesion is:

    In which case do advanceState() return with this error code?

    What could be gone wrong?

    What can I check?

    In which range should the image rects (in, out, mask) be?
    advanc...
    Perhaps you are requesting a Rect that's larger than what Photoshop will give you.



    gFilter-%26gt;inputRate will reduce the size of what Photoshop will give you. To figure out what Photoshop can give you, you might want a function like:



    VRect getScaledFilterRect()

    {

    //This is an accessory function that calls GetFilterRect

    //---but also scales it--- to account for gFilterRecord-%26gt;inputRate

    //This is typically less dangerous than GetFilterRect()

    VRect returnRect = GetFilterRect();



    ScaleRect(returnRect, 1, gFilterRecord-%26gt;inputRate); //I can't remember if you call gFilterRecord-%26gt;inputRate or something %26lt;%26lt; 16



    return returnRect;

    }



    Make sure that your inRect() isn't larger than GetFilterRect *after* it's been scaled.



    Your problem might be something entirely different of course...

    Threading in plugin code

    I'm trying to write a plugin that does some very time-consuming image processing, and I'm trying to use multiple threads to improve performance. I first tried using OpenMP, which worked fine, except that if we executed any OpenMP pragma (even a critical or atomic), Photoshop would crash later (after the plugin is closed).

    So, I concluded that Photoshop and OpenMP don't get along, and I switched to using Intel's Threading Building Blocks library. With that, I get similar behavior - executing any parallel algorithm, even if I've only got one thread, and even if I don't *do* anything inside the parallel block, causes Photoshop to crash on exit.

    Has anybody done something like this successfully? Was there a trick to it? I could write threads by hand, but I don't have any reason to believe that it's going to work any better.

    For what it's worth, all of this threading is happening inside a static library built using the Intel C++ compiler v10.1, linked into a plugin built using GCC 4.0. Needless to say, all of this code works perfectly in my test applications.

    Thanks,
    AaronThreading in plugin code
    And why you are not using destination OS threading functions? E.g. pthread for mac and Winbase.h in Win.

    Do you join threads before you quit plugin?

    I noticed also mystical crashes of Photoshop (not related to threading) but when used particular Carbon string functions on Mac. This is fracking magic and you have to play with it.

    PS:
    It has to work but you can not spawn threads and then return main thread from plugin to Photoshop I think if you do so.

    And I would consider all suites calls as critical sections, avoiding using suites from multiple threads simultaneously.

    PS2:
    And I would debug Photoshop, I had to do this several times. Just run it attach debugger if it crashes you will probably see where the problem is, maybe it's in threading library somewhere.Threading in plugin code
    Don't call Photoshop functions via FilterRecord from other threads!
    Photoshop API isn't thread-safe.
    First, I'm using OpenMP and/or TBB because it's a hell of a lot easier, more efficient, and more cross-platform than using native threads. I could do it with native threads, and it's possible that it would work, but I'm saving that for a last resort.

    Second, I'm not doing anything at all in my threads at the moment - in the case of OpenMP, if the code encounters *any* OpenMP pragmas at all, even just a critical or atomic, Photoshop will crash later. If there are no pragmas, there's no crash. I don't have to even create threads for this to happen.

    I can attach a debugger to Photoshop, but when it crashes it's nowhere near my code. The actual crash (in the OpenMP case) occurs in Photoshop's Open dialog, and only when it's in thumbnail view. No idea why.

    I have to partially retract my statement about TBB. The crash that I'm seeing seems not to be directly related to TBB calls, but I haven't yet figured out what it is. It's possible that in the course of switching over to TBB I managed to break something else - I'm investigating this now. This may yet be a workable solution.

    Thanks,
    Aaron
    No, I was right the first time. Making a single call to tbb::parallel_for will cause Photoshop to crash on exit. This happens even if I've initialized TBB with a single thread (so there's no actual parallelism going on), and even if the body of my algorithm doesn't do anything.

    Aaron
    This is known as ''a world of hurt''... just based on your description (I've never tried it, but would expect pretty much the amount of pain you found).

    Adobe really needs to document this stuff better.
    I quickly took a look at intel web site and there is sentence
    (http://softwarecommunity.intel.com/articles/eng/1197.htm)

    ''At the end of the parallel region, threads are suspended''

    Therefore I asked question if you join threads if you leave plugin.

    You have to ensure that you quit all threads when leaving plugin, but it's quesiton how to achieve this with OpenMP.

    So start plugin in debugger and watch threads, if the threads remain after processing quit from plugin then this is problem.
    I got it working using Threading Building Blocks. My original problem with TBB seems to have been resolved by explicitly releasing all PS suites when the plugin closes (including those acquired by PS code). I did this by making a wrapper around the basic suite that tracks suite acquisitions, and then releasing them all by hand when my filter closes.

    Never got OpenMP to work. There wasn't an issue with joining threads, because I'm threading only a small part of my process - by the time I close the filter, it's long since over.

    Thanks,
    Aaron
  • parameter
  • CS3 Extended Plugin Options?

    I'm trying to write a 3D file format plugin for PS CS3 Extended, and I would

    like to give the user a way to change the import options.



    Question is, where are they?



    I don't see any Options... button in the Open File dialog, so

    how do you access the import options for a 3D plugin?



    Can someone tell me what actions invoke these cases:

    - formatSelectorOptionsPrepare

    - formatSelectorOptionsStart

    - formatSelectorOptionsContinue

    - formatSelectorOptionsFinish

    Photoshop File Formats.pdf .... where...

    Hello



    I am looking at the API documentation, and it refers to an external file called Photoshop File Formats.pdf. Since I wanted to read and write PSD files, rather than actually interfacing with Photoshop, I think I may just want to use this document as a resource to do this.



    Anyone know where this document can be found?



    Thanks

    n8
    Photoshop File Formats.pdf .... where...
    Click on ''Get access to Photoshop SDK'' on the following web site http://partners.adobe.com/public/developer/photoshop/devcenter.html



    Then ask specifically for the ''file formats document'' and that you want to read and write PSD files in your application.

    installing photoshop 6.0 on OS X...

    I'm trying to install ''CS'' upgrade version on my clean install

    OS X Tiger.



    It needs an installed version of photoshop to install...when I try to install photoshop 6.0 it needs ''classic'' which is not installed with Tiger.



    help
    installing photoshop 6.0 on OS X...
    I'd recommend the Photoshop forum. The Photoshop SDK is a tool for

    programmers.



    Aandi Inston
  • help blackheads
  • Selecting layers

    I am trying to do the following:



    for each layer

    {

    if bitmap grab all the pixels

    if vector mask get the info

    }



    seems simple... and yet the doc is so artfully vague and without clear structure, I don't see how to do that.



    I have gone through the outbound sample, and started to write some simple code and here's where I am at:



    -I can get the number of layers, their type and size

    -I can grab the pixels from the first layer



    this is it: I do not know how I can select another layer; there is nothing in the doc about this,I do not know how I can parse the vector data, there is nothing in the doc either.

    everything relies on the update progress callback,however I can only find in the SDK's header files what fields are read by the callback, it's not in the doc once again and it's all but clear from the header file.



    I emailed Adobe, but I did not get a clear answer:

    -%26gt; is the vector data available from the SDK?

    -%26gt; how can I select which layer I want to retrieve pixels from?



    I found scripting can access all this, but I've to do a lot of processing and it has to be fast; and it seems that even handling binary files with scripts is going to be a hassle.
    Selecting layers
    What you are trying - all is possible via exportParamBlock members. Study documentation and you have to play a lot with that.



    I was able to get layers only rasterized. Vector information is not accessible via export plugin.



    What you are trying to do would be probably possible only from automation plugin.

    Configuring Images for Web Display,...

    I need help defining standards for the optimal resolution for the following three renditions of a high resolution image:

    1. Brochure

    2. Powerpoint/Presentation

    3. Web Display

    I have Adobe Acrobat 8.0 Professional and Photoshop CS3 running on an XP OS with 4GB RAM. I'll be using a company printer for printing the brochures, a Xerox 7760 (like the ones they use at Kinko's).

    Any help will be much appreciated. I don't have a lot of expertise in this area. I have just been playing with the software (trial and error) but have not come across a single configuration/resolution setting that will satisfy all or even most of my images.Configuring Images for Web Display,...
    I need help defining standards for the optimal resolution for the following three renditions of a high resolution image:

    1. Brochure

    2. Powerpoint/Presentation

    3. Web Display

    I have Adobe Acrobat 8.0 Professional and Photoshop CS3 running on an XP OS with 4GB RAM. I'll be using a company printer for printing the brochures, a Xerox 7760 (like the ones they use at Kinko's). Any help will be much appreciated. I don't have a lot of expertise in this area. I have just been playing with the software (trial and error) but have not come across a single configuration/resolution setting that will satisfy all or even most of my images.
  • dog
  • CS3 Extended Plugin Error Message

    I'm trying to write a 3D file format plugin for PS CS3 Extended, and whenever I remove

    a certain plugin, U3D.8BI, from the Plug-Ins directory, I always get the error message:



    ''Could not complete the New Layer From 3D File command because of a program error.''



    when trying to add a new 3D layer with any plugin (.3ds, .dae, .obj, etc..)



    Why is this particular plugin required to be in the Plug-Ins directory?

    It seems like nothing will work if it isn't in there.



    Is this a bug?
    CS3 Extended Plugin Error Message
    Updating to version 10.0.1 does not help either.



    The New Layer From 3D File command is broken when the Universal U3D.8BI plugin is

    removed from the \Plug-Ins\File Formats directory. I hope someone can fix this.
    CS3 Extended Plugin Error Message
    Um, maybe I'm missing something, but why would you remove an Adobe

    supplied plug-in which clearly does something important, and why would

    you complain when things break as a result? Why would you consider

    this a bug?



    Aandi Inston

    I noticed this bug because I removed all 3D plugins from the directory prior to testing.



    The Universal U3D.8BI plugin is just another file format, like Collada or Max, so

    it shouldn't break the import tool if it's removed.



    In fact, I can remove all plugins, except Universal U3D.8BI, and it still works.

    Something is obviously wrong.

    I doubt Adobe would consider it a bug. Many products implement core

    functions in required plug-ins. Still maybe someone knows different.



    Aandi Inston

    What I think is happening, is that Photoshop has adopted this Universal format as its default format.

    The program is specifically looking for the existence of this file, and gives up if it can't find it.



    The Universal plugin itself contains no essential functionality. It's just another file format.

    I'm just saying Photoshop should handle the default case better and not break.

    Can't debug; CS3 / Visual Studio 2005

    This is with Visual Studio 2005 and Photoshop CS3.



    I have built the 'outbound' sample, put in the PS's plug-in folder and it is loaded properly.



    I tried the following:

    - run photoshop from the debugger and the breakpoint on main is not triggered (VS says that no symbols are loaded).



    - run photoshop and attach to the process and the same thing happens



    what are the steps I need to accomplish? I fail to see how Visual Studio would even know this plug-in is running and would attach the symbols to the code I have loaded, so I must have totally missed a step.
    Can't debug; CS3 / Visual Studio 2005
    As you write, you build plugin, copy it to plugins folder, start Photoshop, set breakpoint, attach debugger, activate plugin and code execution should stop at your breakpoint.
    Can't debug; CS3 / Visual Studio 2005
    that is what I was doing, but I found the problem:



    the debugger could not find the pdb file, now this is working!



    (however I find the SDK's doc a total joke)

    other plugin hosts

    Hallo,



    maybe its a sacrilege, but I'm trying to make plugins compatible to other host. Are there any general rules for this?



    I hve serveral quesition:



    1. how can I detect which host loaded my plugin?



    2. how can I detect it colorservice are really implemented (on XnView the pointer is not NULL, the function call worked, but no conversion was performed...



    3. even XnView has a problem with advanceState(). During real filtering it works perfectly. But for getting preview image (in filterstart to) it crashes. I suspect after trying it with a debugger that the size may be an issue. But I cannot detect any rules. I know it works with inRect and outrect 200x200. Any ideas?
    other plugin hosts
    All of these questions are host-specific. You either need to communicate with the developers of the host application you're testing against, or do your own reverse engineering of their API behaviour. :)



    All I know is that in my own plugins, I've never done anything host-specific but always coded to the PS API as documented, and let the cards fall as they may. Ultimately it's the host's responsibility to emulate Photoshop and they will do that with varying degrees of fidelity. Anything you do beyond that, is your own cost/benefit tradeoff.
    other plugin hosts
    The example code for dissolve does this in DoFilter():



    if (tileWidth == 0 || tileHeight == 0)

    {

    *gResult = filterBadParameters;

    return;

    }



    This won't work for Irfanview as it will return either == 0, so I believe the best thing to do is to set tileWidth and tileHeight to some number (e.g. 256?). (Photoshop seems to send tileWidth=256 and tileHeight=272 on my system, dunno why.)

    Figured something else out:

    Some hosts will report gFilterRecord-%26gt;depth = 0

    Should probably assume 8 if you see 0.

    GIMP: Do any filters work correctly in GIMP? I've tried... my own
    free plugins, Telegraphics Filter Foundry, the CS3 SDK Dissolve example, and the two plugins that come with Irfanview's 8bf thing.



    The preview seems entirely screwed up, though the plugin will render (except for Filter Foundry, which won't load). Anybody know what the fix is?

    Some more notes:



    Photoline: Suites like SProperties is not supported. Before calling functions in that, check that the suite pointer is not NULL.



    GIMP: The PSPI plugin does not handle per-plane/non-interleaved data for preview due to a bug (or lack of feature) in the code. Since it's open source I'll probably try to update the PSPI code.



    Glenn Chan

    http://www.colormancer.com/

    http://www.free-photoshop-plugins.com/

    http://colorcorrection.info/

    Internal Format of Photoshop Clibboard

    Is the internal format of Photoshop's clipboard documented? My filter

    plugin exports a channel to the clipboard.



    The problem I'm having is that I sometimes run into capacity issues with

    large images, using the standard Windows bitmap format.
    Internal Format of Photoshop Clibboard
    %26gt;The problem I'm having is that I sometimes run into capacity issues with

    %26gt;large images, using the standard Windows bitmap format.



    Don't forget that you can defer providing clipboard data, so you put

    only a handle onto the clipboard no matter how large what it is that

    you copy. Eventually you have to render if it is pasted, but you

    haven't used extra memory in the mean time.





    Aandi Inston
    Internal Format of Photoshop Clibboard
    Good point, Aandi. That may in fact be what Photoshop does. Thanks.

    Of course, this presumes that a plug-in can receive the deferred

    render request via a Windows message...



    Aandi Inston

    %26gt; Of course, this presumes that a plug-in can receive the deferred

    %26gt; render request via a Windows message...



    Probably could be done using a bg automation plugin with an invisible

    window.
  • help blackheads
  • Adobe Product Setting for Other...

    Im a new user of Adobe *Photoshop* CS3 Extended and Adobe Illustrator CS3. . Is Adobe *settable* to other Language other than English??? if so . . how is it done??? thanksAdobe Product Setting for Other...
    I don't think you are using the Photoshop SDK, a tool for programmers.
    Try the regular Photoshop forum. Be sure to say what country you
    purchased your Adobe software from, it makes a difference.

    Aandi InstonAdobe Product Setting for Other...
    hello i want to change the language of my version of cs,actualy my
    version is in potuguais i want in french.what is the solution ?
    i had a problem for open my image with the french enteprise for print
    the french cs say '' i dont recognize the target '' why and how open?
    ''I don't think you are using the Photoshop SDK, a tool for
    programmers.
    Try the regular Photoshop forum. Be sure to say what country you
    purchased your Adobe software from, it makes a difference.''

    Aandi Inston
  • bird
  • PhotoShop JavaScript API - know path of...

    hello, another question... :] in photoshop CS3 with ExtendScript 2.0, i get the script path with



    $.fileName



    for example:

    the fileName method of $ return the:

    ''~/Desktop/script.jsX''



    it is correctly!!!



    The problem is, in photoshop CS2 with ExtendScript 1.0, don`t exists this method in $, how to get the path of script ???



    thanks!!!
    PhotoShop JavaScript API - know path of...
    You need to post scripting questions in the Adobe Photoshop Scripting forum.



    -X

    PhotoShop JavaScript API -Timer(thread)

    hello, exists timer(thread) object in PhotoShop JavaScript API ???



    In javascript embedded in browsers the common call name:

    setTimerOut and setInterval.



    the two functions not function in .JSx



    what the solution ?



    thanks!
    PhotoShop JavaScript API -Timer(thread)
    No, there is no timer object in Photoshop JavaScript API.

    Export plugin Leopard build question

    Hi,



    I have my export plugin for Photoshop and it's built in Leopard machine.

    This plugin is not working on Tiger, it's registered (menu item present) but when trying invoke any action that would go to the plugin main insufficient RAM dialog window is reported.



    Photoshop does not reach plugin main function at all.



    Am I missing something obvious?



    Thanks.
    Export plugin Leopard build question
    Solved, nevermind.

    Alpha channels in a PNG file

    I' am new to the PNG file format, but we would like to use it on a project I' am working on due to the size of the file on disk. But the problem is that we need an alpha channel in the file. I know that Photoshop CS displays the image with transparency but it has no alpha channel this is no good for us. Are there any plugins out there that allow Photoshop to do this.



    Thanks

    Nigel.
    Alpha channels in a PNG file
    Hi All,



    I want to change the transparency of the PNG image, for that I gone through the document which say that, after changing the tRNS chunk of the PNG datastream we can change the transparency of the PNG image.



    But after changing the 4 bytes of the tRNS chunk I can't get the transparency.



    So any body can me to solve this Problem or suggest any other method to change the transparency.



    regards,

    krmlkr
    Alpha channels in a PNG file
    Use
    libpng. For code relevant to alpha, see my
    psdparse or
    icoformat. It sounds like you're not correctly setting color_type.

    Thank you for your response.

    I am trying to change the transparency of image in buffer by just changing the ''tRNS chunk'' from the data stream of PNG image.

    Is it possible to do so ?

    If you're hand-rolling your own PNG code, then you're on your own. My advice is to use libpng.

    Help - color loss when transparency...

    hi, i'm writing filter plug-in which makes a pink rectangle on the layer,
    only differs in transparency each column.

    So all pixel color must be same, regardless of transparency.
    you see it by 1)making a solid rect on layer, 2) make alpha layer mask and put gradient on it,
    3) and apply alpha layer mask.

    i expected the same result, but actual result was very strange.
    i fill the rectangle in (249, 125, 125) color, but the blue and green color
    dramatically drop to zero when transparency value gets lower, here's sample value:

    alpha value 0 : (0, 0, 0)
    alpha value 40 : (218, 0, 0)
    alpha value 160 : (245, 49, 49)

    and here's the code:
    {
    // make 255x10 rect
    int32 w = 0xff;
    int32 h = 10;
    VRect write_rect = {0, 0, h, w};

    char* planeBuffer = sPSBuffer-%26gt;New(NULL, w * h);
    PixelMemoryDesc destination;
    destination.data = planeBuffer;
    destination.depth = 8;
    destination.rowBits = w * 8;
    destination.colBits = 8;
    destination.bitOffset = 0 ;

    // fill R/G/B #f97d7d
    ReadChannelDesc* chR = gFilterRecord-%26gt;documentInfo-%26gt;targetCompositeChannels;
    memset(planeBuffer, 0xf9, w * h);
    sPSChannelProcs-%26gt;WritePixelsToBaseLevel(chR-%26gt;writePort, %26amp;write_rect, %26amp;destination);

    ReadChannelDesc* chG = chR-%26gt;next;
    memset(planeBuffer, 0x7d, w * h);
    sPSChannelProcs-%26gt;WritePixelsToBaseLevel(chG-%26gt;writePort, %26amp;write_rect, %26amp;destination);

    ReadChannelDesc* chB = chG-%26gt;next;
    memset(planeBuffer, 0x7d, w * h);
    sPSChannelProcs-%26gt;WritePixelsToBaseLevel(chB-%26gt;writePort, %26amp;write_rect, %26amp;destination);

    // fill alpha channel 0~0xff
    ReadChannelDesc* chA = gFilterRecord-%26gt;documentInfo-%26gt;targetTransparency;
    for (int32 y=0; y %26lt; h; y++)
    {
    for (int32 x=0; x %26lt; w; x++)
    {
    planeBuffer[y*w+x] = (x % 0xff);
    }
    }
    sPSChannelProcs-%26gt;WritePixelsToBaseLevel(chA-%26gt;writePort, %26amp;write_rect, %26amp;destination);

    // dispose.
    sPSBuffer-%26gt;Dispose(%26amp;planeBuffer);
    }

    Am i doing something wrong?Help - color loss when transparency...
    Looks good to me. A couple of minor problems:

    1) pad the rows to an even number of bytes.
    2) experiment with writing different constant alpha values

    I spent more than a few minutes puzzling over this, and would be curious to
    know what the eventual problem was.
  • help blackheads
  • grey hair
  • The code from ''getter'' plug in

    I want to get the code to draw Bezier path. The listener log could not get the codes. But the code from getter log could not work rightly.



    -------------------------------------

    error = sPSActionControl-%26gt;StringIDToTypeID(''Getting Work Path Info'', %26amp;runtimeEventID);

    if (error) goto returnError;



    error = sPSActionControl-%26gt;Play(%26amp;result, runtimeEventID, desc00001040, plugInDialogSilent);

    if (error) goto returnError;

    ---------------------------------------

    In the last sentence, it is error.



    Do you use getter code all right?

    I hope to discuss with you. Thank you.
    The code from ''getter'' plug in
    Didn't you ask this before?



    Aandi Inston
    The code from ''getter'' plug in
    Yes,I asked this before. But there is no answer. I am not sure it because the question is illegible.



    Other path could get from listener log. But the Bezier curve path could not. Is it secret for Adobe?



    I try to ''getter'' plugin to get the code. But it is not work. I guess that ''Getting Work Path Info'' is not in effect for photoshop. But I could not find other appropriate ''event''. Couldn't the code from ''getter'' plugin be used?



    Thank you for your attention. Please help me. Thanks.

    It is worth reposting once, but more is unlikely to help unless you

    say clearly that you have done so. The same people will see it, and

    will have no more reason or ability to answer than before.



    Personally, I have no knowledge that can help you, sorry.



    Aandi Inston

    Listener and Getter are similar but not the same. The same part is the way that getter/listener ''dump'' descriptor information to disk. Listner code can be copy/pasted to an automation plug-in and executed 99% of the time. Implementing getter code in your automation plug-in is different. You should look at the Getter example to see exactly what is going on. Getter shows you what can be ''got'' from Photoshop. Meaning, if Getter can write it to disk then the information is available.



    Here is the trick.



    Listener uses Put* routines. Getter needs Get* routines but 'writes' Put* routines because the same routine is writing out the descriptor contents. (Think about it for a while and it will be clear.)



    So, figure out what class you need to ''get''. classApplication, classDocument, classLayer.



    Figure out what property you need. keyNumberOfDocuments, keyName



    And grab that info with a eventGet.

    Thank you, Tom Ruark!

    HOW PHOTOSHOP GET THE BRUSH PRESSURE...

    HELLO!!



    I saw some people using a WiiRemote to DIY a touch screen.and of course the IR PEN have no pressure-sensitive.



    I wonder ,even if i made a force-sensitive-device ,then connect it to USB host. but HOW PHOTOSHOP KNOW THE PRESSURE SIGNAL??what i need to do inside the driver code?



    is that a sdk or something to change a pressure signal FROM device TO photoshop??



    THANKS!
    HOW PHOTOSHOP GET THE BRUSH PRESSURE...
    It is a driver of sorts. The standard way for applications to communicate with pointing devices is through an API called Wintab. If you look around the web you will find it easily. It comes as a DLL, a header and a few lib files. Note, it dosen't belong to Microsoft. I think the DLL is vendor/hardware specific.



    I don't know enough to tell you exactly what the hardware is actually sending. I know its pretty slow though.
    HOW PHOTOSHOP GET THE BRUSH PRESSURE...
    OH!!THANKL YOU SO MUCH!!!



    :)

    Color Picker algorithm

    Hi,



    I am trying to implement color picker using wxpython similar to adobe photoshop color picker (Hue Based). What I need to know is when you enter values in RGB or HSV fields it automatically sets the both pointers(Gradient and color) to correct position. What's the math behind this?



    Regards

    Using DisplayPixels with different...

    According to the comments in PIGeneral.h (in the PSPixelMap declaration), the DisplayPixels function can handle only grayscale, RGB, CMYK, and Lab images, plus Duotone and Indexed if it matches the document's format (presumably because the function wants to use the palette from the document). I have a multichannel image that I'd like to draw.



    The question is, is there any way to get Photoshop to convert this to a usable format for me? Since I don't know the channel characteristics, I don't think I can do it myself. Alternatively, is there a way to deduce the conversion from the ReadChannelDesc structures in the FilterRecord? Does anybody have code to do this?



    Thanks,

    Aaron

    Make Bezier curve path in plug in

    I could get the codes to draw paths in automation plug-in with the listener log file. But some paths are not shown in it. Such as the B茅zier curve path.

    I try to use the getter plug in. The fuction ''SPErr PlayGetting Work Path Info'' is to draw path. But the code like this is not work rightly.
    ---------------------------------------------------

    error = sPSActionControl-%26gt;StringIDToTypeID(''Getting Work Path Info'', %26amp;runtimeEventID);
    if (error) goto returnError;

    error = sPSActionControl-%26gt;Play(%26amp;result, runtimeEventID, desc00001040, plugInDialogSilent);
    if (error) goto returnError;

    -------------------------------------------------------

    Could you tell me how to draw B茅zier curve path? How to used the codes from ''getter'' plug in rightly?

    Please help me. Thanks a lot.
  • going to release
  •