Page 1 of 1

Few Quries

Posted: 2009-08-23T20:04:37-07:00
by volatil3
Hi.

I am quite new to newMagick and I am willing to evaluate it against my requirement. I have to work on apparel web application in which user will upload pattern of their existing dress and that pattern (as texture I think) will be applied on existing images of different types of clothes(shirts, trousers etc).

Allow me to explain it further. We all know that structure of certain clothes always remains same that is, a shirt will always have two sleeves or half sleeves etc.The user will select the cloth of type SHIRT. Then user will upload some pattern/texture which he wants to apply.after clicking some button, the shirt will be transformed into the pattern which was uploaded by the user.

I want to know whether it's possible in ImageMagik? if yes then I sure need guidance for implementation.

Thanks

Re: Few Quries

Posted: 2009-08-23T20:48:41-07:00
by fmw42
you will need to make a binary mask of the dress, skirt or whatever. white for the object and black elsewhere. then you need an image of the color or texture you want on the dress or skirt that is the same size as the binary mask. then you composite the mask with the texture image to cut out the texture to fill the mask. see

http://www.imagemagick.org/Usage/compose/

It would help if you had examples and would provide a link to the examples.

Re: Few Quries

Posted: 2009-08-23T20:56:52-07:00
by volatil3
fmw42 wrote:you will need to make a binary mask of the dress, skirt or whatever. white for the object and black elsewhere. then you need an image of the color or texture you want on the dress or skirt that is the same size as the binary mask. then you composite the mask with the texture image to cut out the texture to fill the mask. see

http://www.imagemagick.org/Usage/compose/

It would help if you had examples and would provide a link to the examples.
Thanks for your kind response.

Are you talking about this example?

http://www.imagemagick.org/Usage/compose/#mask ?

as far as example thing I have been looking for, NikeID is the best example so far I have found:

http://nikeid.manure.com/nikeid/index.jsp

Thanks

/A

Re: Few Quries

Posted: 2009-08-23T21:04:27-07:00
by fmw42
Are you talking about this example?

http://www.imagemagick.org/Usage/compose/#mask ?
Yes, but a variation on that concept.

Perhaps this is a better page. http://www.imagemagick.org/Usage/channels/
and more specific
http://www.imagemagick.org/Usage/channe ... ed_compose
as far as example thing I have been looking for, NikeID is the best example so far I have found:

http://nikeid.manure.com/nikeid/index.jsp
All this is doing is changing the color, there is no texture change that I can see.

Re: Few Quries

Posted: 2009-08-23T21:13:06-07:00
by volatil3
Thankyou for the response

I know NikeID is all about changing in color but I gave the example which has somewhat similar concept that is chaning things of a model and preview it.

Regarding the URL you have given in your last post,i dont know what are you referring in it but i found good example of removal of background from an existing image which I might need later.

In the previous example I found the following which is applying a pattern on an existing image:

http://www.imagemagick.org/Usage/compose/#hardlight

There is another question..since I will be using all that in php. Does PHP extension supports all functionality of Image Magik?specially masking one?


Thanks

/A

Re: Few Quries

Posted: 2009-08-23T21:27:15-07:00
by fmw42
see
http://www.imagemagick.org/Usage/channels/#compose

and

http://www.imagemagick.org/Usage/channe ... ed_compose

The half moon shape is the mask and the polka-dots pattern the background that gets masked into the shape. The blue water is the backgournd that is make into the region around the shape and may or may not be relevant to your purposes.

Again perhaps one of your images might be helpful.

See http://www.sitepoint.com/blogs/2009/06/ ... photoshop/
http://www.indezine.com/products/photos ... rator.html
http://www.tutorialsportal.com/uncatego ... bit.html/3
http://akvis.com/en/decorator/screensho ... exture.php

Re: Few Quries

Posted: 2009-08-23T21:48:06-07:00
by volatil3

Perfect example..specially car one but they are in photoshop based and I need to provide an Interface to the user to perform similar task. One option is server side lib like ImageMagic etc but for that I would need special permissions to run the utility itself or Flash. I myself is not a flash guy so trying to avoid it however it seems that flash would be the last option.

Any suggestion? do you know anything like that in Flash/Actionscript too ?

Thanks

Re: Few Quries

Posted: 2009-08-23T21:49:18-07:00
by fmw42
Nothing in flash. But what is done in Photoshop can likely be done in ImageMagick.

Re: Few Quries

Posted: 2009-08-23T23:35:55-07:00
by anthony
NOTES
  • To do this properly the texture image being colored should be a grayscale image, this should be the destination image.
  • The three image composition with a mask can be used to limit the area being modified.
  • then you would apply the color to the image using one of the 'light' composition methods. EG: Overlay, HardLight, SoftLight, LinearLight, etc etc etc..
However Some of defintions of the various 'Light' methods sometimes need the greyscale 'texture' as a source and the color as destination which is the reverse of what I described above. If that is the case the better idea is to...

Merge the texture and the color in whatever way works best. Then overlay the rest of the destination image using the mask (negated). This two step compose method will let you use the 'light' compose methods in what ever order works best.


Please let us know what you find about the various 'light' compose methods. What works (and in what order for source/destination) and what doesn't.

WARNING: I recently went through through them to ensure they work correctly (as documented on various web sites) and even added a couple more methods. So please ensure your IM is the very latest.