Page 1 of 1

Glitch and leaking during -disort

Posted: 2019-04-23T01:09:16-07:00
by kamil
Hello. Still im trying learn some skill to make better mockup images. But today i get trouble with distort . When i tray distort my image i get glitch or leaking on result image.
Input design file
Image
Background image
Image

And merget together after script

Code: Select all

magick "C:\HippoDatabase\imageMaker\mockup\v natural.jpg" ( "C:\HippoDatabase\imageMaker\s3\21000\21814\White.png" -background transparent -resize 2136x3642 -distort Perspective "0,0,0,0 0,2583,0,2583 2136,0,2136,207 2136,2583,2136,2374 " ) -gravity West -geometry +498+0 -composite -quality 98 "C:\HippoDatabase\imageMaker\preview\1.jpg"
And result image
Image
Please look at character "C" and top right corner of gold. Any idea why my result is like that?

other design but same error

Code: Select all

cmd /c  magick "C:\HippoDatabase\imageMaker\mockup\v natural.jpg" ( "C:\HippoDatabase\imageMaker\s3\22000\22581\22581-B-.png" -resize 2136x3642 -distort Perspective "0,0,0,0 0,3642,0,3642 2092,0,2092,293 2092,3642,2092,3349 " ) -gravity West -geometry +498+0 -composite -quality 98 "C:\HippoDatabase\imageMaker\preview\q.jpg"
Image


Any idea why it happens, i misscalculate somethink?

Re: Glitch and leaking during -disort

Posted: 2019-04-23T05:32:20-07:00
by snibgo
Your images use pixels to their edges. "-distort" extends the image using virtual pixels, and the default virtual pixels is "edge", so these are repeated. To make the virtual pixels transparent-black, insert "-virtual-pixel None" before "-distort".