• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with ImageMagick And Java Runtime Exec  RSS feed

 
Mohamed Hegab
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Have a bit of a strange problem no java expert i know could solve ..

i need to used imagemagick on my application to make the emails on my website converted to images so no pot can take the emails easily .. the problem solved with image magick command line as following
convert -size 200x30 xc:transparent -font /home/emad/TITUSCBZ.TTF -fill black -pointsize 12 -draw "text 5,15 'emadhegab@hotmail.com'" /home/emad/test.png

and it work like magic really and so i tried to put that on the java to run it with Runtime.getRuntime().exec(command) but the result is sadly disappointing .. i have now image as output ..but with no text inside.. i do a sys out to see the command and took the command that outed and put it in the terminal and it worked..so the problem in the Runtime some how.. the code of java is .. in case you are asking



it'll give you blank image .. do any one have a solution
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the Javaworld article "When Runtime.exec() won't".
 
Mohamed Hegab
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well i've tried his example and here's my new code




and i've got the following messages which make no sense to me :S

<ERROR>
convert: unable to open image `5,15': No such file or directory.
convert: unable to open image `'emadhegab@hotmail.com'"': No such file or directory.
convert: Non-conforming drawing primitive definition `text'.
</ERROR>
Process exitValue: 1







p.s
i'm on UBUNTU platform
 
Mohamed Hegab
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i found it at last




no need for the stupid runtime exec
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!