Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am still trying to get it to work.

I had been using IM 4 for a very long time but I want to upgrade it because I really like it.
Here is what I have in my program and I thought it would work with the new version but for some reason it doesn't. Can you tell me what I am doing wrong?
VB
S$ = "L:\Vbpros\ImgM\ImageMagick\convert -rotate 90 " + App.Path + "\Temp\Source.bmp " + App.Path + "\Temp\Result.jpg"

The fist directory is where IM is installed, the second is where the Image is and the third is where it is to be placed.
VB
pid = Shell(S$, 0)
               Rem This is how it's called 
Do
WaitForTerm pid
DoEvents
 If pid = 0 Then
Form1.Sam.Picture = LoadPicture(App.Path + "\Temp\Tmp.bmp")
          Rem This is how I get it back into My Program
  End If
 Loop Until pid = 0
Posted
Updated 7-Nov-11 9:20am
v2
Comments
Sergey Alexandrovich Kryukov 7-Nov-11 15:32pm    
Not clear what's not working; you need to describe it.
--SA
Jalex69 23-Nov-11 11:47am    
Thanks for the help.
You were right, it was a Shell problem.
I solves the problem by using standard Quotes( "" ) like you explained.
****************
convert -size 100x100 xc: +size xc:red xc:yellow -fx " + """ar=hypot( i/w-.8, j/h-.3 )*4; br=hypot( i/w-.3, j/h-.7 )*4; u[1]*br/(ar+br) + u[2]*ar/(ar+br)"" " Result.jpg
**************
None of these worked with the single quote or apostrophe ( '' )

Thanks again for you help
I have thought about getting Linux for years but I play a lot of MS Games and I use my computer for 100;s of other things too like programming and game writing so I never got it.



Did you try using the same command from command prompt? The only thing that can cause problem is the App.Path. Try enclosing the path in quotes like,
VB
S$ = "L:\Vbpros\ImgM\ImageMagick\convert -rotate 90 """ + App.Path + "\Temp\Source.bmp"" """ + App.Path + "\Temp\Result.jpg"""
 
Share this answer
 
Hi Thank you very much.

Yes I did and I them saw errors telling me that it couldn't find some of it's files.

I re-installed it and it works now but it does so many more things than the old version I am still studying it. Like most guys I want to make it do a lot that VB doesn't do so I have a steep learning curve. LOL A lot of this stuff like the perspective draw and rotate image by degree I had already written using the Windows dll's and was excited to see they worked almost as good as IM. My program is patterned after Paint Shop Pro but does many more function a lot better. I animate all my clips and masks so I can drag them smoothly from one image to another and paste them down and it makes it really quick to alter images. It also lets me blend them into the picture to get rid of the sharp edges. It can also spray with solid color or any bitmap while controlling the amount of transparency. It has a text function too but it's a little crude and I would like to improve on that as well. I am always looking for improvements.

I think I want to use the IM fonts. Is there a way I can print a font list on a bitmap so I can get it into a VB listbox then call the IM print functions?
I also think if I had a good way to detect image outlines I could do even more and image magick could do that for me too.
 
Share this answer
 
I am trying to so something that I thought would be simple'
like convert source.bmp -fill rgb(255,355,255) -draw 'color 75,75 floodfill' Result.bmp

I can't get it to do anything and running from the dos window gives me all kinds of errors I don't understand. Is the (75,75) the X/Y cords of the point to start the fill from? Where do I put the X/Y pixel color? Can You explain it better?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900