How I can add my image (not iconbutton) in dialog?
with imageDraw() ? Please help me with this.
How to add my image in dialog
How to add my image in dialog
I have never gotten drawImage() to work. No matter what I try it throws an error, 'Can not execute'.
So I just use the image control.
Code: Select allvar dlg = new Window( 'dialog', 'Image Example Script' );
dlg.image = dlg.add ('image' , undefined, new File('/c/t.png'), {name:'temp'});
dlg.show();
So I just use the image control.
Code: Select allvar dlg = new Window( 'dialog', 'Image Example Script' );
dlg.image = dlg.add ('image' , undefined, new File('/c/t.png'), {name:'temp'});
dlg.show();
How to add my image in dialog
Thanks Mike,
It works great!
When I try to substitute a relative path for the absolute path, I get an "invalid image data" warning. The image name is "image.png" and it's in the same folder as the script.
Code: Select alldlg.image = dlg.add ('image' , undefined, new File('./image.png'), {name:'temp'});
What am I doing wrong?
TIA
It works great!
When I try to substitute a relative path for the absolute path, I get an "invalid image data" warning. The image name is "image.png" and it's in the same folder as the script.
Code: Select alldlg.image = dlg.add ('image' , undefined, new File('./image.png'), {name:'temp'});
What am I doing wrong?
TIA
How to add my image in dialog
I have not used relative paths when creating an image resource but I don't think that would work like that. How would the File object constructor know which path to use as the base path.
I use a absolute path to create the resource. If I need the script to be flexible I use one of the following ways to build the absolute path.
One of the Folder class properties like Folder.userData.
One of the Zstring for Photoshops paths like app.path + "/" + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts");
Or File($.fileName).parent to get the folder where the script is installed.
I use a absolute path to create the resource. If I need the script to be flexible I use one of the following ways to build the absolute path.
One of the Folder class properties like Folder.userData.
One of the Zstring for Photoshops paths like app.path + "/" + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts");
Or File($.fileName).parent to get the folder where the script is installed.
How to add my image in dialog
Thanks Mike,
File($.fileName).parent seems to be giving me what I want.
File($.fileName).parent seems to be giving me what I want.
How to add my image in dialog
I have never gotten drawImage() to work. No matter what I try it throws an error, 'Can not execute'.
You have to call this method from an onDraw callback. having said that, i haven't actually got that to draw properly, though it doesn't throw any errors.
I'll just use the image control
You have to call this method from an onDraw callback. having said that, i haven't actually got that to draw properly, though it doesn't throw any errors.
I'll just use the image control
How to add my image in dialog
Hi, guys!
Please help draw a image on the group. DrawImage() etc.. Maybe only this way help me with my UI
The purpose of this: put the photo as background under a number of other Controllers (horizontal lines - another toolbutton controls, each line - one control) and photo must be visible through. I need create something as guidelines, but in the Dialog. A few groups in the stack not help. Group can not be transparent and they overlap each other
DrawImage() - this method leaves the hope that all will be drawn correctly. But for me it is not clear how to implement it.
Help with examples, please!
Please help draw a image on the group. DrawImage() etc.. Maybe only this way help me with my UI
The purpose of this: put the photo as background under a number of other Controllers (horizontal lines - another toolbutton controls, each line - one control) and photo must be visible through. I need create something as guidelines, but in the Dialog. A few groups in the stack not help. Group can not be transparent and they overlap each other
DrawImage() - this method leaves the hope that all will be drawn correctly. But for me it is not clear how to implement it.
Help with examples, please!