Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group avatar losing PNG transparency

  • @raphadko

    Participant

    When I upload a group avatar, all transparency is lost and the background goes black. I tried searching all over for this but even though it looks like an old wordpress bug, I haven’t found anything tha would fix it. Can anyone help?

Viewing 12 replies - 1 through 12 (of 12 total)
  • @raphadko

    Participant

    ps: the image is converted to JPG after the cropping
    ps2: I have a 24bit png

    @modemlooper

    Moderator

    I think you may be stuck with jpg as BP gets the file by reading images in a folder and looks for .jpg

    @chouf1

    Participant

    @raphadko,

    never noticed, but i have the same bug on my site 1.6.3 Ms / WP 3.5
    I just tried with a profile avatar. The background goes black on the image to crop and is transparent on the preview image. As soon as saved, it goes black and to jpg !
    Unknown bug for me !

    @modemlooper

    Moderator

    It’s not a bug.

    @ubernaut

    Participant

    i noticed one of our users had transparency in his avatar but i’m almost certain it’s because he has a gravatar. maybe there’s a relatively painless way to trick BP into thinking a group has a gravatar? Pure conjecture but just a thought.

    @modemlooper

    Moderator

    BP takes an image and creates a new file with new file name so it can manage images without having to hit the database for every user. It uses a structure:

    [group-avatar-folder]/[group-id]/[long-generated-string]-bpfull.jpg

    There is no way to easily use a .png without a ton of refactoring of code.

    @ubernaut

    Participant

    ok gotcha but i know it works for users:

    http://gotgame.com/members/ohnorobo/

    i didn’t do anything to make that happen and he never uploaded his avatar so i would think that has to be a gravatar.

    @modemlooper

    Moderator

    @raphadko

    Participant

    @modemlooper

    ok this might sound weird.. but.. the JPEG saved actually had transparent background, take a look at this: http://www.arkade.com.br/wp-content/uploads/group-avatars/16/c57713e3bfea3eec42c644783894570c-bpfull.jpg

    So, the thing is, it used to keep the bg transparent, even converting to a jped file. Now it converts to a black bg.. any thoughts on that?

    @modemlooper

    Moderator

    create a .png change the file name to .jpg and then upload it and try.when reading the file info it’s saying it’s a png

    @raphadko

    Participant

    I had changed something in the code that was saving it as a JPG, but was still a PNG, keeping the transparency. Maybe I had changed something in the wp core, according to some website I found on the web, but now I can’t find it again

    Do you have any idea on how I can get this back?

    @raphadko

    Participant

    The thing is that wp-crop-image has changed with the new editor in 3.5, now every web page showing how to do that trick is outdated..

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Group avatar losing PNG transparency’ is closed to new replies.
Skip to toolbar