It is currently Mon Jul 22, 2024 6:18 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Without transparency if I use the copy option?
PostPosted: Mon Jan 28, 2013 10:07 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
GIMP Version: 2.8.2
Operating System: Windows
OS Version: XP - SP3
GIMP Experience: Beginner Level
URL or Image link: http://en.celebrity-speakers.de/static/img/slidebar/garry-ka



Hello!
Doubt arose now.
Was downloading an image (transparent .png) and on the website it appears as if the white background (until then normal).
But when I use the copy option and open the Gimp (File> Create> From Clipboard) transparency is lost! The background is black.
To avoid losing the transparency of the image in Gimp, I needed to download it to my HD (hard Driver) and then open it with Gimp.
Was this a bug or am Gimp with some setting wrong?

Thx.

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 8:49 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 26, 2012
Posts: 342
Location: France
Apparently it's not due to firefox (last stable build), nor gimp (2.6), I tested with your avatar. I believe it's a png settings issue, each png image has its own settings embedded, like color space, color profile, background transparency and so on.
Have you tried to save the image regularly (no clipboard) ?

Your link is 404 BTW.

Oh and for the sake of accuracy, here is a portable tool I use to edit unwanted png settings:
tweakpng - http://entropymine.com/jason/tweakpng/
Beware though as editing critical datas crushes your image, so edit a copy to be sure.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 3:33 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Hi anarkhya,

Yes, I saved on my hard disk, and thus transparency was preserved.
The link appears to be definitely 404. In any case, is below the image.
Image

I appreciate the feedback and indication of tweakpng portable.
Thank you very much! :tyspin :bigthup

P.S: Try yourself : File> Create> From clipboard in Gimp, the above image.

It appears so in my Gimp. Without transparency, and the black background.
Image

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 3:45 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Hi, Akros!
I think the problem is the browser's clipboard API, which is somehow not supporting transparency. Just curious, what browser do you use and what version?
I tried with chrome and ie and their clipboards seem to not support transparency. I don't think it's GIMP. The same thing is happening with Inkscape and PS.

BTW, is that a picture of Gary Kasparov?


Last edited by K1TesseraEna on Tue Jan 29, 2013 4:25 pm, edited 1 time in total.

Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 4:20 pm  (#5) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Akros wrote:
Was downloading an image (transparent .png) and on the website it appears as if the white background (until then normal).
But when I use the copy option and open the Gimp (File> Create> From Clipboard) transparency is lost! The background is black.
To avoid losing the transparency of the image in Gimp, I needed to download it to my HD (hard Driver) and then open it with Gimp.
Was this a bug or am Gimp with some setting wrong?
Thx.
What you are doing is a basic 'copy visible' you will not retain embedded settings, such as transparency, unless you download the source image. This is not a bug or a limitation of the applications, only the method.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 4:40 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Thanks, Odin!
Your simple explanation clarifies everything! Never crossed my mind that it's the same as 'copy visible' :)

What is not clear yet, why it assigns black bg color. Not white, not any arbitrary opaque color.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 5:06 pm  (#7) 
Offline
GimpChat Member

Joined: Jun 04, 2011
Posts: 80
copy the image location & have gimp open the location.

File/Open Location


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 5:12 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
ico4498 wrote:
copy the image location & have gimp open the location.

File/Open Location



Yeah! That works!


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 5:52 pm  (#9) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
K1TesseraEna wrote:
Hi, Akros!
I think the problem is the browser's clipboard API, which is somehow not supporting transparency. Just curious, what browser do you use and what version?
I tried with chrome and ie and their clipboards seem to not support transparency. I don't think it's GIMP. The same thing is happening with Inkscape and PS.
This is correct.
K1TesseraEna wrote:
What is not clear yet, why it assigns black bg color. Not white, not any arbitrary opaque color.

According to the image comment ("Image->Image Properties"), the file was created with GIMP. When you export to the PNG file format, one of the options is "Save color values from transparent pixels". If this option is disabled then GIMP will replace all fully transparent pixels with the current background color. This color is never seen (the pixel is transparent), but making them all the same color usually helps in compressing to a smaller filesize.

You can test this with the following:
  • Load a JPEG file
  • Add an alpha channel to the layer.
  • Perform an "Edit->Clear" (the layer becomes transparent).
  • Export to a PNG file with the "Save color values from transparent pixels" option checked.
  • Load the saved PNG file (the image should still be transparent).
  • Perform "Layer->Mask->Add Layer Mask" with the 'Initialize Layer Mask To' option set to "Transfer layer's alpha channel".
  • Delete the layer mask (your original image is restored).

Now repeat the above with a red BG color and with the "Save color values from transparent pixels" option unchecked (the result should be a solid red image).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 9:25 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Hi guys!

K1TesseraEna wrote:
Just curious, what browser do you use and what version?
Chrome Versão 24.0.1312.56 m
K1TesseraEna wrote:
BTW, is that a picture of Gary Kasparov?
Yes it is! :bigthup :clap

Odin wrote:
What you are doing is a basic 'copy visible' you will not retain embedded settings, such as transparency, unless you download the source image. This is not a bug or a limitation of the applications, only the method.
Thx Odin, how i don't speak english, is hard to me find words to say, then i will to use the same as KiTesseraEna, cause would be what i would like to say:

Your simple explanation clarifies everything! Never crossed my mind that it's the same as 'copy visible'
What is not clear yet, why it assigns black bg color. Not white, not any arbitrary opaque color.

ico4498 wrote:
copy the image location & have gimp open the location. File/Open Location

Thanks ico4498, not yet tested, but KiTesseraEna said works. I'll check it out!
Edited: Yes that work! :yes :hi5 Thx!

saulgoode thx, i will try do it now!

Thank you all for your attention to this question! :tyspin :bigthup :bowdown

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Tue Jan 29, 2013 10:53 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Wow saulgoode, this is witchcraft! :wow
A transparent image appears out of nowhere! Incredible. :hexer
That would explain how the image was saved. ("Save color values ​​from transparent pixels" option unchecked)

:puzzled But what is not clear yet, why in this case the transparency is not recovered? The black background does not disappear, even following steps:

Perform "Layer->Mask->Add Layer Mask" with the 'Initialize Layer Mask To' option set to "Transfer layer's alpha channel".
Delete the layer mask (your original image is restored).

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Wed Jan 30, 2013 9:21 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: May 26, 2012
Posts: 342
Location: France
@Akros:
It may help if we put some facts on the table, you may already know them or some of. Usually an image without transparency (=without alpha channel) is RGB, in RGB color space, for each pixel in your image you have 0 to 255 possible values of R (Red), 0 to 255 possible values of G (Green) and 0 to 255 possible values of B (Blue) so each pixel is given an R*G*B value, so, for instance, a fully saturated red pixel is 255R 0G 0B. This is the case for jpg image.

Now when transparency is added to the mix, your RGB image gets another channel it's the A (Alpha) so you get an R*G*B*A* image with, for each pixel, also 0 to 255 possible values of Alpha (Opacity), this is the case for png images, however for gif images there are only 2 possible values, a pixel is either 0 or 1 (opaque or transparent).

Sorry if I brought some already known facts (:


Top
 Post subject: Re: Without transparency if I use the copy option?
PostPosted: Wed Jan 30, 2013 1:40 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
Hi anarkhya!

Very enlightening! Placed thereby becomes clearer understanding. I believe that others will also benefit from all this. :bigthup
Thx very much! :tyspin

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) i struggle with the option to copy the path - the path where a file i

3

No new posts Attachment(s) Path copy rotate shift plus + Path copy rotate shift walk Play

79

No new posts Help with the option param TOGGLE (Solved)

1

No new posts Attachment(s) Staining option, How To Add - Color Pick

4

No new posts Attachment(s) Problem with manual selection option.

1



* Login  



Powered by phpBB3 © phpBB Group