How to place an image on a document?

I tried to create a plugin to place images in the Photoshop document using a Mac based on the current draft "Dissolve" provided in the SDK of CC.

I'm at the stage of trying to place an image in a document. To find the code for this I have built the listener plugin and ran through the steps of using Photoshop menu item 'File: Place '.... "to place an image (I tried up to this gifs and EPSes) on a document. I then looked at the generated code and tried to build a function to do what I wanted that.

However, when I try to run it I got the following error message: "Could not complete the order to dissolve because of a program error."

I'll add the current form of my code at the end to not clutter up my comments.

If I comment the line with "sPSActionControl-> Play ("then error disappears." (Of course then nothing happens.)

A few notes:

(1) I did not store the exact layout of the output of the headphone plugin. The compiler complained about the goto methods listener added.

(2) I am under that in an objective-C++ class (which is triggered by a file with a m-m postfix).

(3) there are statements NSLog to help me understand the problem. I see the number 7, but I never see the final error code. It looks like an exception.

(4) I kept old code that I tried commenting, then you will see some of my thinking that I had a hard time with this.

Any ideas or suggestions?

----

-(SPErr) photoshopPlayeventPlace:(char *) cPath

{

NSLog (@"photoshopPlayeventPlace %d", 0, NULL);

Result PIActionDescriptor = NULL;

PIActionDescriptor desc0x100 = NULL;

PIActionDescriptor desc0x108 = NULL;

Auto_Desc descriptor;

Auto_Desc offsetDetails;

SPErr error = kSPNoError;

Handle aliasValue = NULL;

FullPathToAlias (cPath, aliasValue);

do

{

error = sPSActionDescriptor-> Make (& desc0x100);

If (error) break;

NSLog (@"%d photoshopPlayeventPlace", 1, NULL);

error = sPSActionDescriptor-> PutAlias (desc0x100, keyNull, aliasValue);

error = sPSActionDescriptor-> PutAlias (descriptor.get (), keyNull, aliasValue);

If (error) break;

NSLog (@"%d photoshopPlayeventPlace", 2, NULL);

error = sPSActionDescriptor-> PutEnumerated (desc0x100, keyFreeTransformCenterState, typeQuadCenterState, enumQCSAverage);

error = sPSActionDescriptor-> PutEnumerated (descriptor.get (), keyFreeTransformCenterState, typeQuadCenterState, enumQCSAverage);

If (error) break;

NSLog (@"photoshopPlayeventPlace %d", 3, NULL);

error = sPSActionDescriptor-> Make (& desc0x108);

If (error) break;

NSLog (@"%d photoshopPlayeventPlace", 4, NULL);

error = sPSActionDescriptor-> PutUnitFloat (desc0x108, keyHorizontal, unitDistance, 0);

error = sPSActionDescriptor-> PutUnitFloat (offsetDetails.get (), keyHorizontal, unitDistance, 0);

If (error) break;

NSLog (@"photoshopPlayeventPlace %d", 5, NULL);

error = sPSActionDescriptor-> PutUnitFloat (desc0x108, keyVertical, unitDistance, 0);

error = sPSActionDescriptor-> PutUnitFloat (offsetDetails.get (), keyVertical, unitDistance, 0);

If (error) break;

NSLog (@"photoshopPlayeventPlace %d", 6, NULL);

error = sPSActionDescriptor-> PutObject (desc0x100, keyOffset, classOffset, desc0x108);

error = sPSActionDescriptor-> PutObject (descriptor.get (), keyOffset, classOffset, offsetDetails.get ());

If (error) break;

NSLog (@"photoshopPlayeventPlace %d", NULL, 7);

error = sPSActionControl-> Play (& result, eventPlace, desc0x100, plugInDialogSilent);

error = sPSActionControl-> Play (& result, eventPlace, descriptor.get (), plugInDialogSilent);

If (error) break;

NSLog (@"%d photoshopPlayeventPlace", 8, NULL);

}

While (false);

If (result! = NULL) sPSActionDescriptor-> Free (result);

If (desc0x100! = NULL) sPSActionDescriptor-> Free (desc0x100).

If (aliasValue! = NULL) sPSHandle-> features (aliasValue);

If (desc0x108! = NULL) sPSActionDescriptor-> Free (desc0x108).

NSLog(@"photoshopPlayeventPlace error:%d", error, NULL);

error return;

}

You can't 'play' a type of filter plug-in. (Dissolve)

You can 'play' a type of plug-in automation. (Auditor, Getter, AutomationFilter, et al.)

Tags: Photoshop

Similar Questions

  • V 32.0.3 using how to place an image inside an email?

    Using v 32.0.3 How place an image in an email, not attached?

    Use HTML put this under Tools | Accounts settings | {Select account} | Composition & addressing

    When dialing, use Insert | Image on the menu, or use drag-and - drop or copy-and - paste directly into the body of the message.

    No menu? Hold the alt key, select V for display, activate the menus and bars of tools.

    Tip: create at least three drafts first lines and insert on the middle. This makes it easier to fit in more text, or to select previously entered text to change.

  • How to place an image in Photoshop?

    In the photo below it shows where I'm trying to enter my cover image and profile picture. within the circle. I don't know how to put the photos directly in forms. I need help. Thanks in advance.

    Help with Card.jpg

    Help with Card 2.jpg

    I wasn't sure if you were talking about how use the place command or how to accurately place an image in the form, then it is how do the latter and the gene already told you how to make the first

    (1) draw your shape to contain the image

    (2) position just the form like this

    (3) to provide the image that you want to use in Photoshop. Lots of ways to do copy / paste, drag / drop, the place command

    (4) use the move tool to position the image on the form

    (5) with the image layer selected, cut the image to the form

    (6) it looks like this

    (7) then your image fits perfectly into the form. You may need to use the transform tool to get the exact right size.

  • How to add png images in the document?

    Hi, I need to add images in the document. Currently I am placing them with the PlaceFileInFrame function. But this function creates links to the images. I could integrate this links later, but I would like to know how to add images (png, bmp,...) in order to document without making links. Also, I would like to know if it is possible to create links to images stored in the web (http, https)? Looks like the answer is 'no', but maybe I'm missing something. Thanks in advance!

    I guess that you are above InDesign CS4.

    After you have placed the image, you should incorporate it.

    You should do: ILinkResource::Embed

    Check ILinkResource::CanEmbed before you embed it.

    There are several ways to find the ILinkResource of pageItem UIDRef.

    Consider the following:

    Get the ILink for your UIDRef page element, and then find ILinkResource of ILink.

    Look at the ILinkManager, ILinkUtils.

    InDesign does not support file-based links. In other words, it doesn't support file:// model.

    However, InDesign offers extensibility to create an image of a document for the web link.

    To do this, you should have your custom link put in work.

    You can see CustomDataLink SDK samples to understand how to do this.

  • With the removal of APDivs, how to place an image specifically somewhere?

    I started to make Dreamweaver in the class about a week ago. My mission is to make a RESUME. In class, I used AP Divs make a homepage that redirects to my info, portfolio, etc.
    So I got home, installed and the 30 day trial, discovered on removing AP div tags. I understand this decision, and I was on the fence about whether or not it is appropriate to use AP div tags first place (feels like an inexpensive way to make a Web site).
    So how can I now place images in specific locations?

    apdivs.png

    It was about how far I got with my initial project using AP div tags. The picture of me on the button was placed using an AP Div. My name at the top left has not been placed with an AP Div (because I can't)

    I intend to restart from the beginning

    So my questions are:

    (1) how do I Center my background so that it looks good on all the aspect ratios

    (2) how to precisely place my images without tags AP div

    (3) what happened "insert a rollover image? I was just copy and paste the code from my other flight path images and change the images.

    Hopefully you can see what I'll do. If there is another way I should approach my goal feel free to tell me what I need to do.

    I would also appreciate it if you guys could explain as simple as possible. I'm really not in HTML and coding in general. I want to just make this assignment well look and do it soon (and move to the first in class).

    CSS handles virtually all of this for you...

    1. in your CSS...

    {body

    background - image: URL(Your-image.jpg);

    background-repeat: repeat no.;

    background-position: top center;

    }

    2. the logo at the top left, CSS...

    #logo {}

    Display: block;

    float: left;

    }

    The HTML code...

    the portrait at the bottom (if you still want to be centered at the bottom)

    {#portrait_wrapper}

    position: fixed;

    Width: 100%;

    Bottom: 0px;

    }

    {#portrait}

    Width: 100px; / * or some other less than 100% setting * /.

    Auto margin: 0;

    }

    3 Insert > rollover Image is now insert > HTML > rollover Image

    Visit this site and do the tutorials for html and css, it will make your work in much simpler DW: http://www.w3schools.com

  • How to place the image (or widget) inline in a block of text.

    How is it possible to place an image (or some kind of widget, like presentation of slides) in a text, online in some position.

    I just have something similar to these compositions of widget library that come with an image in the upper left corner and the text is placed around it.

    I wonder if there is a function like any text editor ever.

    Thank you.

    Kind regards

    Ciro.

    You can have some elements as inline in a text. Simple copy or cut the item (or even several grouped items) with the black arrow, place the text cursor in the row you want the item and Paste it. It will be by default acting as a character in the line, but if you select it again with the black arrow, you can set the options in the Panel wrap to break the text up, above and below the item, or even to leave text floating to the left or the right of the element.

    You can try to paste more complex items or same set of widgets online, but I wouldn't shoot...

  • How to place an image inline with the text using InDesign CS4?

    I'm writing the first draft of an instruction manual how two for some software.

    I'm writing the manual directly in InDesign CS4 and making screen shots that I'm making progress. I format the screenshot in Photoshop and export it to a JPG file.

    In InDesign, I double-click in the text box where I want to insert the image, go to file > place, get the picture, then press on open.

    Usually InDesign inserts the image at the cursor flashing in the text, but sometimes what happens is that no picture inserted and everything after it disappears. I get several empty text boxes and need to Control-Z to get back to where I started.

    Now I can put the image outside the text box and then manually move it to the text where I want to go, however when I export the file as HTML, then I need to manually move it to the appropriate area in Dreamweaver (when the image is placed inside the text box to the flashing cursor, the HTML file shows the image in the right place).

    I was able to insert the line in file with the text to a new paragraph mark, but sometimes InDesign doesn't let me do. Sometimes it does, sometimes it doesn't.

    I don't know what I'm doing to prevent it from placing the paragraph mark and the blinking cursor (which is where I want it to appear).

    This is a recording of screen 54sec of my actions:

    http://storytechnician.com/temp/idcs4-place/

    Steps to follow:

    I double-click inside the text box

    I place the image

    everything goes

    I have a few pages scroll, and then return to the starting point

    I have to scroll through a page or double-click inside the text box then press return a few times, and the previous image, I put in this way is automatically pushed to the next page.

    I go back to point of original departure, try again, and it does not work.

    I've done it before, but now it does not work. I don't know what's happened prevents him from online to the location of the cursor.

    Help, please.

    Thank you

    It seems to me that the image is too wide for the frame. You can place it on the editing table, scale in the size, then cut to the Clipboard and paste it into the flow of the text.

  • I could place an image in a document BCTI without loss of quality

    Could I place an image inside a BCTI document without loss of quality?

    Review:

    The only thing in this document is the proxy, not the entire chart.

    Bob

  • How to place an image in a table cell.

    In my plugin, I want to place an image in a selected cell similar to the function table: file-> Place... on the Indesign menu.

    Thank you very much.

    1. replace the type of cell PageItemContentType

    2 get the PageItemContent in the cell

    3 load and place an image in the PageItemContent

  • How to place the image on a sloping surface of a photo

    So I try to place an image in the window that is part of another image.  the window is tilted slightly and want this photo to fit perfectly on the window so that it looks like its really on the window.

    Big thank you to all those who can enlighten us.

    You have integrated the image?

    Then goto: object/envelope distort a net brand, and then use the transformation free and varied modifiers.

    I would like to know if I'm clear enough.

    G

  • "How to place an image on ' new background" when open documents in tabs is disabled

    I am trying to use the "technique of the mirror' (watch videos to learn)

    I opened the image in PS 2014... with "documents open in form of tabs is disabled...

    Make a new document the size that will contain the image doubled...

    reproduce the image

    reversed horizontal...

    but when I place the 'new document'... nothing happens... just separated from windows...

    Thank you

    On frame 1, CTRL + A to select all.

    CTRL + C to copy.

    Go to the image 2, CTRL + V to paste.

    Click on the move tool and adjust the placement of the layer as needed.

    Nancy O.

  • How to enlarge all images in the document using a script?

    Hello

    I used the script ImageCatalog to place a 1000 + images of different dimensions in the document. In the ImageCatalog dialog box, I unchecked the proportional and the frame option content to place images at 100%. I'm looking for a way to extend all the frames graphics to reveal images that he placed on the document. When you double-click the bottom right handle, will expand the framework to see all the content. (it would be your time when you do this one by one)

    Let me know. Thank you very much.

    If I understand you correctly, you have placed images without using frame to adapt to the content and that you now try fix this? Do you find that a fair executives greater and, at this point, can do their overlap others? If this is going to be a problem, just run the script again but this time with the correct settings...

    In any case. Typing on my iPad so I can't check. but something in the lines of

    g = app.activeDocument.allGraphics;

    for (i = 0; i

    g [i] .fit (FitOptions.FRAME_TO_CONTENT);

    See http://jongware.mit.edu/idcsjs5.5/pc_Graphic.html#fit

  • How to place the image on screen

    the image on my screen is shifted to the left. my vista control panel doesn't have a selection of the display, which has been the choice to manage such a problem in the previous version of windows. How can I move my screen back right on my screen?

    Never mind. I got it. That is controlled by the buttons on the face of my monitor. Thank you for your time of reading.

  • can someone guide me how to place multiple images on a closed path using the pen tool draw in?

    Please

    For many images, it is a little different.

    You first need to group them.

    Then stick on the path.

  • How to use the Image in the document Tag (title).

    Hello

    I use Jdeveloper 11.1.1.3.0.

    I want to show a title image itself. tag that allows you to do this one.

    Kind regards
    Rami

    http://www.davesite.com/WebStation/HTML/favicon.shtml

    You mean a favicon

Maybe you are looking for