Automation of PSD lanyards with ImageMagick
-
- Posts: 4
- Joined: 2018-10-04T21:42:29-07:00
- Authentication code: 1152
Automation of PSD lanyards with ImageMagick
I have few PSD lanyard mockups like these http://graficzny.com.pl/mockup-smycz/
Here if i edit layer1 image from photoshop then whole lanyard design changes automatically. Now I want to do this programmatically using ImageMagick on my server. Is it possible that i upload the base image from web, then it creates lanyard according to mockup and show it to user. Pardon my bad English
Here if i edit layer1 image from photoshop then whole lanyard design changes automatically. Now I want to do this programmatically using ImageMagick on my server. Is it possible that i upload the base image from web, then it creates lanyard according to mockup and show it to user. Pardon my bad English
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Automation of PSD lanyards with ImageMagick
I have worked with Imagemagick to process PSD files. Can you post an example PSD file and identify what you want changed. You can post to some free hosting service such as dropbox.com that will not change you image format. Then put the URL here.
___________________________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
___________________________________
Please, always provide your IM version and platform when asking questions, since syntax may differ.
Also provide your exact command line and your images, if possible.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620
If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli
For novices, see
http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
-
- Posts: 4
- Joined: 2018-10-04T21:42:29-07:00
- Authentication code: 1152
Re: Automation of PSD lanyards with ImageMagick
Thanks for reply fmw42 .
Here is a sample PSD ( https://www.dropbox.com/s/8nlpnwx4771uw ... 1.psd?dl=0 ) which I want to automate.Here is also a video of procedure that is currently done manually.
https://www.dropbox.com/s/fkojc6xaqxleh ... d.mp4?dl=0
In the video if we edit image of Layer 1 whole lanyard design gets changed. Now, to automate, user can just upload the base image ( the smart object which we edited in layer 1) and user can download the final design .
Hope this clarify the requirement.
Here is a sample PSD ( https://www.dropbox.com/s/8nlpnwx4771uw ... 1.psd?dl=0 ) which I want to automate.Here is also a video of procedure that is currently done manually.
https://www.dropbox.com/s/fkojc6xaqxleh ... d.mp4?dl=0
In the video if we edit image of Layer 1 whole lanyard design gets changed. Now, to automate, user can just upload the base image ( the smart object which we edited in layer 1) and user can download the final design .
Hope this clarify the requirement.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Automation of PSD lanyards with ImageMagick
I am not 100% sure about this, but I do not think Imagemagick can do what you want. It is very limit in its PSD file processing and knows little about smart layers, adjustment layer, group layers, etc.
Re: Automation of PSD lanyards with ImageMagick
As I understand it fmw42 the OP wants to map the flat image to the lanyard image and as it will be online there will not be any Photoshop interaction.
I suppose it would be similar to the T shirt code although I have no idea how it would cope with going under and over. I noticed the Original Lanyard image had a grid where the flat image was to be placed.
I suppose it would be similar to the T shirt code although I have no idea how it would cope with going under and over. I noticed the Original Lanyard image had a grid where the flat image was to be placed.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Automation of PSD lanyards with ImageMagick
Perhaps I misunderstand. But I do not think he can extract that layer, modify it and put it back, since it is part of a smart layer. But then I am not a Photoshop expert, especially with regard to smart layers. If all the layers were simple, then I think it could be done.Bonzo wrote: ↑2018-10-06T11:10:09-07:00 As I understand it fmw42 the OP wants to map the flat image to the lanyard image and as it will be online there will not be any Photoshop interaction.
I suppose it would be similar to the T shirt code although I have no idea how it would cope with going under and over. I noticed the Original Lanyard image had a grid where the flat image was to be placed.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Automation of PSD lanyards with ImageMagick
I confirmed with Dirk that Imagemagick cannot handle smart layers at this time.
In fact, I tried converting your PSD to a new PSD and opened it in Photoshop and saw that it now had a lot of normal layers and not the smart layers.
See https://imagemagick.org/script/command- ... php#define
In fact, I tried converting your PSD to a new PSD and opened it in Photoshop and saw that it now had a lot of normal layers and not the smart layers.
Code: Select all
convert Lanyard_Mockup_1.psd -define psd:additional-info=all new.psd
-
- Posts: 4
- Joined: 2018-10-04T21:42:29-07:00
- Authentication code: 1152
Re: Automation of PSD lanyards with ImageMagick
Thanks for reply Bonzo. You understood the problem correctly. I saw this example mentioned in your post http://www.fmwconcepts.com/imagemagick/tshirt/index.php. It can work if weBonzo wrote: ↑2018-10-06T11:10:09-07:00 As I understand it fmw42 the OP wants to map the flat image to the lanyard image and as it will be online there will not be any Photoshop interaction.
I suppose it would be similar to the T shirt code although I have no idea how it would cope with going under and over. I noticed the Original Lanyard image had a grid where the flat image was to be placed.
1) Start with background image (https://www.dropbox.com/s/9xia5pcneu12p ... k.png?dl=0) , which i will upload for each template
2) Create overlay image (https://www.dropbox.com/s/9xia5pcneu12p ... k.png?dl=0) from base image (https://www.dropbox.com/s/t2wz3y1t6djdc ... e.png?dl=0) using ImageMagick
3) Merge background with overlay using ImageMagick
Is it possible in ImageMagick to do point number 2 ?
-
- Posts: 4
- Joined: 2018-10-04T21:42:29-07:00
- Authentication code: 1152
Re: Automation of PSD lanyards with ImageMagick
Thanks for reply fmw42. Is it possible to edit Lanyard_Mockup_1.psd base image (https://www.dropbox.com/s/t2wz3y1t6djdc ... e.png?dl=0 in current example) before converting it to new.psd ?fmw42 wrote: ↑2018-10-06T16:43:33-07:00 I confirmed with Dirk that Imagemagick cannot handle smart layers at this time.
In fact, I tried converting your PSD to a new PSD and opened it in Photoshop and saw that it now had a lot of normal layers and not the smart layers.
See https://imagemagick.org/script/command- ... php#defineCode: Select all
convert Lanyard_Mockup_1.psd -define psd:additional-info=all new.psd
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Automation of PSD lanyards with ImageMagick
What do you consider the base image? When I convert your PSD to a new PSD, I get lots of yellow layers, one for each section of the lanyard.Is it possible to edit Lanyard_Mockup_1.psd base image (https://www.dropbox.com/s/t2wz3y1t6djdc ... e.png?dl=0 in current example) before converting it to new.psd ?
I can export the flattened layer from each and get the same PNG result.
Code: Select all
convert Lanyard_Mockup_1.psd[0] test1.png
I cannot say whether that would work or not for what you want to do. All you can do is try and see.