Page 1 of 2

Urgent - please help!

Posted: 2019-01-15T01:59:58-07:00
by line7
I am using Imagemagick to process the images. I am using this code to remove the white border from the images:

Code: Select all

"C:\Program Files\ImageMagick-7.0.8-Q16\mogrify.exe" -monitor -shave 10x10 *.png
For some very interesting reason the images render fine in all browsers BEFORE beign processed by imagemagick. The background color of the images in all browsers stays the same as it is on the computer (RGB - 13,13,13).

Now when I process the images with the above code - the images still have the same background color when opened on computer (RGB - 13,13,13) - but start to have different background (RGB - 5,5,5,) when opened in all kinds of browsers - chrome, firefox - android on mobiles.

I wonder if I mitgh use anotehr command to remove the borders or mayeb I need to add the code to preserve the background/color profile of the images?

This is the ORIGINAL image - not processed with imagmagick (maybe you can try shaving it yourself to see if it loses its background??) :shock: :shock:

Image

the link to image

http://i63.tinypic.com/2vccfpe.jpg

Re: Urgent - please help!

Posted: 2019-01-15T02:00:58-07:00
by line7
here is the processed image:

Image

you will notice its background has changed! :shock:

Re: Urgent - please help!

Posted: 2019-01-15T02:01:27-07:00
by line7
you will see the new image has NEW backgroudn color!

Re: Urgent - please help!

Posted: 2019-01-15T02:02:02-07:00
by line7
maybe I need to use a different command to shave the image?

Re: Urgent - please help!

Posted: 2019-01-15T07:25:03-07:00
by line7
NO IDEAS AT ALL??((

Re: Urgent - please help!

Posted: 2019-01-15T07:42:51-07:00
by snibgo
You link to the input image 2vccfpe.png and show an output image 2m76lgw.png. They have the same background colour, and I see no reason why browsers should show them differently.

But the actual image you used may have a colour profile, and your image hosting service may have stripped that profile.

Re: Urgent - please help!

Posted: 2019-01-15T08:05:38-07:00
by line7
yes the have the same backgroudn when opened on computer - do you get the same background color from the ABOVE two images? can you try a free colorpicker ? like CP1?

The imagemagick when processing the images does not strip the images of prifile but still I get the different backgroudn color(( :shock:

Re: Urgent - please help!

Posted: 2019-01-15T15:33:50-07:00
by fmw42
Does your color viewer or picker change the image format to JPG. If so, JPG is a lossy compression and changes colors. I have had very inconsistent results from various color pickers from screen displays as the colors do change by different viewers. You need to be sure that you are picking colors on a the original image and not one that has been redisplayed in some other format. Also as snibgo has said, some viewer may strip profiles or add profiles and that could affect the color.

Re: Urgent - please help!

Posted: 2019-01-16T01:23:16-07:00
by line7
thnak you for your kind reply. The original images (which have not been manipulated by imagmagick) - show the same colors everywhere - on PC, on web and on mobiles - the images with borders removed (by shave command) start to show differently in browsers....

maybe there is an alternative command to SHAVE which I can try? can you recommend any?

or Can I ask imagemagick to preserve color profile when shavign the image?

Re: Urgent - please help!

Posted: 2019-01-16T05:39:03-07:00
by line7
CAN YOU TRY SHAVING THAT ORIGINAL IMAGE YOURSELF?

Re: Urgent - please help!

Posted: 2019-01-16T05:57:35-07:00
by snibgo
You haven't shown or linked to any file with an embedded profile.

"-shave" won't strip profiles.

Re: Urgent - please help!

Posted: 2019-01-16T08:44:17-07:00
by line7
tahnk you - the first image above is the original non processed image - which has the expected background of 13 13 13 RGB

the second image is the proceed one with background of 5 5 5 RGB - can I avoid this when I shave the images?

Re: Urgent - please help!

Posted: 2019-01-16T08:45:22-07:00
by line7
you can see the difference with a colorpicker (http://www.romeolight.com/products/cp1/)

Re: Urgent - please help!

Posted: 2019-01-16T09:29:26-07:00
by snibgo
I don't know why some browsers might display different colours. Have you tried it without "-shave"? Do you get the same bad result?

Re: Urgent - please help!

Posted: 2019-01-16T09:32:57-07:00
by line7
Snibo - shave is the only command performed on the images - maybe there is another command which can cut 10 pixes of borders?