Page 1 of 2

custom last name feature on T-shirt prints.

Posted: 2016-02-04T10:13:18-07:00
by bmano
hi,

I am setting up an opencart store for Printed T-shirts. I'm looking to integrate a feature in the store, where the user can give in his own "CUSTOM WORD" for the t-shirt print, for example: if the print on the tshirt says "i love my DAD" and user inputs MOM as his custom word, then the word has to get replaced and merge within the mockup perfectly. Kindly check the below links as the further examples, which defines clearly what I am trying to say. Thanks in advance.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T10:20:27-07:00
by fmw42
This looks more like a PHP interface issue to get and change names. Where does Imagemagick come in? If you want to render and image from the full text string including the changed word, then Imagemagick can help. There are many ways to render an image from text.

See http://www.imagemagick.org/Usage/text/

Please always provide your IM version and platform when asking question on this forum.

If you are using some Unix variant (Linux, Mac OSX or Windows with Cygwin), then see some of my scripts at the link below. In particular, texteffect and tshirt.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T10:52:03-07:00
by bmano
Hi,

Thanks for getting back on this. As my requirement is to just get the text from the user and convert them to the same exact shape and font as in the Tshirt print, is there any specific set of instructions to do them so?

And the place I 'm stuck so much is where during the process, after getting the text and converting them to images and placing on the Tshirt print, with "still having the wrinkle effect not affected". The text seems to get optimized to the wrinkle effect on the t-shirt's default text!

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T11:17:35-07:00
by fmw42
bmano wrote:
Thanks for getting back on this. As my requirement is to just get the text from the user and convert them to the same exact shape and font as in the Tshirt print, is there any specific set of instructions to do them so?
This a job for your database. You need to have the font and point size stored there so you can replace the new text with the same font and point size as the old default text. There is no image processing here. If I misunderstand, please clarify further.
bmano wrote:And the place I 'm stuck so much is where during the process, after getting the text and converting them to images and placing on the Tshirt print, with "still having the wrinkle effect not affected". The text seems to get optimized to the wrinkle effect on the t-shirt's default text!
I am not sure I understand. Do you want the wrinkles to show on the text or not? I would have to see your code to see what you need to do.

What version of Imagemagick are you using? Are you calling imagemagick via PHP exec() or Imagick or some other API?

Perhaps you can provide an example of your current output and explain what you want or what is wrong?

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T11:34:05-07:00
by bmano
I tried to install imagemagick on my local pc (windows 10 64 bit). I cant get this done clearly.
can you help me to install imagemagick on my local pc. I'm couldn't find the clear instructions for the installation. I tried with the instructions given in the below link, but still didn't go through.

http://refreshless.com/blog/imagick-pec ... k-windows/

I have to get past this step to try it out.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T12:54:47-07:00
by fmw42
Sorry, I am not a Windows user. But see http://www.imagemagick.org/script/binar ... hp#windows

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-04T14:13:11-07:00
by Bonzo
If you search the forum there are threads discussing the Tshirt process and I recommend you post the code you have and an example of what you want and what is going wrong as I am having trouble understanding:
And the place I 'm stuck so much is where during the process, after getting the text and converting them to images and placing on the Tshirt print, with "still having the wrinkle effect not affected". The text seems to get optimized to the wrinkle effect on the t-shirt's default text!
The instructions you are following is for Imagick an php API for Imagemagick. Installing it can be a hit and miss process and Imagick is not written or maintained by the developers of Imagemagick. I do not even know if you can achieve the Tshirt effect with Imagick.

To install Imagemagick on windows go to this page http://www.imagemagick.org/script/binary-releases.php download and run the windows exe file. You will not be able to use fmw42's script on windows unless you install cgwin or what ever it is called.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-08T12:07:25-07:00
by bmano
Bonzo wrote:If you search the forum there are threads discussing the Tshirt process and I recommend you post the code you have and an example of what you want and what is going wrong as I am having trouble understanding:
And the place I 'm stuck so much is where during the process, after getting the text and converting them to images and placing on the Tshirt print, with "still having the wrinkle effect not affected". The text seems to get optimized to the wrinkle effect on the t-shirt's default text!
The instructions you are following is for Imagick an php API for Imagemagick. Installing it can be a hit and miss process and Imagick is not written or maintained by the developers of Imagemagick. I do not even know if you can achieve the Tshirt effect with Imagick.

To install Imagemagick on windows go to this page http://www.imagemagick.org/script/binary-releases.php download and run the windows exe file. You will not be able to use fmw42's script on windows unless you install cgwin or what ever it is called.

Hi,

thanks for your response. I am still trying to finish the imagemagick installation and facing an error while linking with php version 5.6.14 . I found out the Imagick module version 3.4.0RC6 is incompatible with ImageMagick version 6.9.3-3 Q16 x86 2016-02-06, installed in my local computer. Could you please find me the right Imagick module version that's compatible for the above mentioned ImageMagick version 6.9.3-3?

This is the error that I get when I try to run the imagick module 3.4.0RC6 on php " Imagick was compiled against Image Magick version 1681 but version 1683 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0"

pls check the image below for the snapshot of the version.

Image
Thank you

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-08T12:21:30-07:00
by Bonzo
I am afraid I gave up trying to install Imagick and have no interest in it.

You could work the other way around and install the version of Imagemagick that is compatible with your version of Imagick. But then that may not be compatible with the php version!

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-08T12:24:48-07:00
by bmano
Bonzo wrote:I am afraid I gave up trying to install Imagick and have no interest in it.

You could work the other way around and install the version of Imagemagick that is compatible with your version of Imagick. But then that may not be compatible with the php version!
yea, I get your point. If that's the way around, I'll have to install this version of ImageMagick 6.9.1-2 Q16 x86 2015-04-14. Do you have the download link for this one? I am unable to find it anywhere. Thanks

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-08T15:13:50-07:00
by fmw42
Imagemagick only stores source code for x.x.x-10 versions at http://www.imagemagick.org/download/releases/. I could send you the source distribution for 6.9.1-2 for unix if that would help.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-09T08:55:09-07:00
by bmano
fmw42 wrote:Imagemagick only stores source code for x.x.x-10 versions at http://www.imagemagick.org/download/releases/. I could send you the source distribution for 6.9.1-2 for unix if that would help.
Okay, please send me the 6.9.1-2 for unix.

My basic need is this one: http://www.fmwconcepts.com/imagemagick/tshirt/ and I am trying to achieve this by using Imagemagick and Imagick using PHP. And that's when I am facing all these errors, while trying to install the Imagick in PHP. Pls tell me if I'm on the right path?

Thank you

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-09T10:23:54-07:00
by Bonzo
I would say you are on the wrong path if you intend on running Fred's code on a unix server as you do not need Imagick to run it.

You would run it something like this after CHMOD the file to 777

Code: Select all

$cmd=" bash /FULL PATH TO AUTOTRIM/autotrim.sh zelda3_border2w.png fred.png"; 
exec($cmd,$result); 

if($result=="0") 
echo "sucess"; 
else 
echo"fail";

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-09T10:52:17-07:00
by fmw42
My basic need is this one: http://www.fmwconcepts.com/imagemagick/tshirt/ and I am trying to achieve this by using Imagemagick and Imagick using PHP. And that's when I am facing all these errors, while trying to install the Imagick in PHP. Pls tell me if I'm on the right path?
My scripts do not run under Imagick. You would need to use PHP exec() to call them, which is what user Bonzo said above.

Re: custom last name feature on T-shirt prints.

Posted: 2016-02-10T10:32:04-07:00
by bmano
fmw42 wrote:
My basic need is this one: http://www.fmwconcepts.com/imagemagick/tshirt/ and I am trying to achieve this by using Imagemagick and Imagick using PHP. And that's when I am facing all these errors, while trying to install the Imagick in PHP. Pls tell me if I'm on the right path?
My scripts do not run under Imagick. You would need to use PHP exec() to call them, which is what user Bonzo said above.
Hi,

I have used the following code in my PHP script.

Code: Select all

exec("bash ./tshirt.sh -a 1 -m l $in $back $out 2>&1")

I have used to send the parameters as Document root like, 'D:\xampp\htdocs\image.jpg'.
I didn't get any results. Is there anything wrong in my code?