Urgent - please help!

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Urgent - please help!

Post by line7 » 2019-01-15T01:59:58-07:00

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
Last edited by line7 on 2019-01-16T09:30:44-07:00, edited 3 times in total.

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-15T02:00:58-07:00

here is the processed image:

Image

you will notice its background has changed! :shock:
Last edited by line7 on 2019-01-16T09:31:26-07:00, edited 2 times in total.

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-15T02:01:27-07:00

you will see the new image has NEW backgroudn color!
Last edited by line7 on 2019-01-15T02:03:13-07:00, edited 1 time in total.

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-15T02:02:02-07:00

maybe I need to use a different command to shave the image?

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-15T07:25:03-07:00

NO IDEAS AT ALL??((

snibgo
Posts: 11218
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Urgent - please help!

Post by snibgo » 2019-01-15T07:42:51-07:00

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.
snibgo's IM pages: im.snibgo.com

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-15T08:05:38-07:00

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:

User avatar
fmw42
Posts: 24470
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Urgent - please help!

Post by fmw42 » 2019-01-15T15:33:50-07:00

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.

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-16T01:23:16-07:00

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?

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-16T05:39:03-07:00

CAN YOU TRY SHAVING THAT ORIGINAL IMAGE YOURSELF?

snibgo
Posts: 11218
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Urgent - please help!

Post by snibgo » 2019-01-16T05:57:35-07:00

You haven't shown or linked to any file with an embedded profile.

"-shave" won't strip profiles.
snibgo's IM pages: im.snibgo.com

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-16T08:44:17-07:00

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?

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-16T08:45:22-07:00

you can see the difference with a colorpicker (http://www.romeolight.com/products/cp1/)

snibgo
Posts: 11218
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Urgent - please help!

Post by snibgo » 2019-01-16T09:29:26-07:00

I don't know why some browsers might display different colours. Have you tried it without "-shave"? Do you get the same bad result?
snibgo's IM pages: im.snibgo.com

line7
Posts: 27
Joined: 2018-11-12T07:54:48-07:00
Authentication code: 1152

Re: Urgent - please help!

Post by line7 » 2019-01-16T09:32:57-07:00

Snibo - shave is the only command performed on the images - maybe there is another command which can cut 10 pixes of borders?

Post Reply