Image looks different after removing transparent space and scaled
Re: Image looks different after removing transparent space and scaled
these two commands
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
convert img.png -resize 4500x5400! img_scale6.png
convert shirt.png -trim +repage -bordercolor none -border 5 shirt3.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
These two command do not involve the same input/output images. So please clarify the exact commands you used with proper file names to make the output you say is bad. Why are you resizing to the same size as the input -- 4500x4500 -- was the size of the input.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Image looks different after removing transparent space and scaled
Those two commands take two inputs and make two outputs.
You have linked to only one input and one output.
So, which command made that output from that input?
You have linked to only one input and one output.
So, which command made that output from that input?
snibgo's IM pages: im.snibgo.com
Re: Image looks different after removing transparent space and scaled
so original image is like image a, c is output image
convert a.png -resize 4500x5400! b.png
convert b.png -trim +repage -bordercolor none -border 5 c.png
convert a.png -resize 4500x5400! b.png
convert b.png -trim +repage -bordercolor none -border 5 c.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
Why do you need two commands? You can make it just one and save writing an extra image to disk. Where is it failing? Look at the tmp files in my command.
If it works fine in IM 7, then just use IM 7. But when I ask a question, please answer it. Is your libpng the same in IM 7 as IM 6?
Why are you resizing to the same size as your input?
Code: Select all
convert a.png -resize 4500x5400! +write tmp1.png -trim +repage +write tmp2.png -bordercolor none -border 5 result.png
Why are you resizing to the same size as your input?
Re: Image looks different after removing transparent space and scaled
The thing is IM7 is slower than IM6 looks like 5x slower, we cannot afford it, I suspect it is becasue HDRI enabled?
Re: Image looks different after removing transparent space and scaled
oh sorry I found the second command I am using is this one
convert /var/folders/g0/tbbcb38x57j_lk7l__b7fgjxw39ddj/T/trim-image-src79649733683580374.png -format %@ -write info: -trim +repage -bordercolor none -border 5 /var/folders/g0/tbbcb38x57j_lk7l__b7fgjxw39ddj/T/trim-image-dest8416507457673086321.png
does this matter with the color things?
convert /var/folders/g0/tbbcb38x57j_lk7l__b7fgjxw39ddj/T/trim-image-src79649733683580374.png -format %@ -write info: -trim +repage -bordercolor none -border 5 /var/folders/g0/tbbcb38x57j_lk7l__b7fgjxw39ddj/T/trim-image-dest8416507457673086321.png
does this matter with the color things?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
Please show the exact commands for both commands. Answer our questions properly.
Re: Image looks different after removing transparent space and scaled
so this is first command:
convert a.png -resize 4500x5400! b.png
this second command:
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
the input image I put is a.png and output is c.png, scaling size is dynamic and pass from input, it can be 4500x5400 later it can be 3500x5400
libpng version is same as I put in the other post, is there anything else you want to know?
convert a.png -resize 4500x5400! b.png
this second command:
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
the input image I put is a.png and output is c.png, scaling size is dynamic and pass from input, it can be 4500x5400 later it can be 3500x5400
libpng version is same as I put in the other post, is there anything else you want to know?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
If your libpng is the same on IM 6 and IM 7, then I do not know what else might cause it other than some issue with your IM 6 release.
Re: Image looks different after removing transparent space and scaled
last time you talked about lcme, looks IM6 doesn't have lcme and IM7 has, does that matter?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
snibgo said it did not matter since you did not apply a profile to your result. But you could just try adding an sRGB profile to your input and result and see if that helps.
Re: Image looks different after removing transparent space and scaled
think it over I believe the bug happened in this command, sorry make you guys confused since our java application are using two commands together
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
the use case is I need to trim the transparency out of the image and get the offset, if there is any other command you guys can suggest? otherwise the only option for me is try using IM7
convert b.png -format %@ -write info: -trim +repage -bordercolor none -border 5 c.png
the use case is I need to trim the transparency out of the image and get the offset, if there is any other command you guys can suggest? otherwise the only option for me is try using IM7
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image looks different after removing transparent space and scaled
I do not understand. Your command works fine for me.
3739x5194+452+57
It gives the offsets.
Code: Select all
convert b07s8dt2vc-large-front_image.png -resize 4500x5400! -format %@ -write info: -trim +repage -bordercolor none -border 5 result.png
It gives the offsets.
Re: Image looks different after removing transparent space and scaled
oh the offset is correct, the bug I mean is the output is different, as I mentioned earlier in this post, there is transparency in the original pic but in the output these transparency are missing, the transparaency I men is on the image, like black ranger in the pic with IM6
original: https://drive.google.com/open?id=1ufx2A ... XZMolPcnf1
output: https://drive.google.com/open?id=122q_p ... mGJcV0XuFz
original: https://drive.google.com/open?id=1ufx2A ... XZMolPcnf1
output: https://drive.google.com/open?id=122q_p ... mGJcV0XuFz