Convert many different images to one distorting
Posted: 2018-07-25T06:44:21-07:00
Hello and greetings.
I need help or guidance.
I have a background with a pencil case, but unfortunately he is under a strange angle. I have to put a photo with a pattern (graphics) on the lower part of the pencil case. But these pictures are of various sizes and sizes. So, no image values can be rigidly set.
I would like each of my graphic designs to be matched to the size of this green background.
What i doing is.
1)
Open image with desing.
Resize image to size of green surface.
convert W-.png -resize 900x350 -virtual-pixel transparent -extent 900x350
2)
distort above image to corners fo green box.
-distort Perspective '0,0,xRED,yRED 0,900,xWHITE,yWHITE 350,0,xBLUE,yBLUE 350,900,xYellow,yYellow'
and extent that image to size of pencilcase image -extent 1181x827
3)
Compose pencilcase and distorted image
convert '#{outFile}' MugLogo.png -geometry +1121+1292 -composite '#{outFile}'"
What you think about this. im doing it good or i miss somethink?
this is my command without part nb3:
command =" convert W-.png -resize 900x350 -virtual-pixel transparent \
-distort Perspective '0,0,200,422 0,900,208,764 900,0,1022,282 350,900,1050,605' \
-extent 1181x827 checks_pers_rev.png "
I need help or guidance.
I have a background with a pencil case, but unfortunately he is under a strange angle. I have to put a photo with a pattern (graphics) on the lower part of the pencil case. But these pictures are of various sizes and sizes. So, no image values can be rigidly set.
I would like each of my graphic designs to be matched to the size of this green background.
What i doing is.
1)
Open image with desing.
Resize image to size of green surface.
convert W-.png -resize 900x350 -virtual-pixel transparent -extent 900x350
2)
distort above image to corners fo green box.
-distort Perspective '0,0,xRED,yRED 0,900,xWHITE,yWHITE 350,0,xBLUE,yBLUE 350,900,xYellow,yYellow'
and extent that image to size of pencilcase image -extent 1181x827
3)
Compose pencilcase and distorted image
convert '#{outFile}' MugLogo.png -geometry +1121+1292 -composite '#{outFile}'"
What you think about this. im doing it good or i miss somethink?
this is my command without part nb3:
command =" convert W-.png -resize 900x350 -virtual-pixel transparent \
-distort Perspective '0,0,200,422 0,900,208,764 900,0,1022,282 350,900,1050,605' \
-extent 1181x827 checks_pers_rev.png "