Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group avatar losing PNG transparency

  • Profile photo of raphadko
    raphadko
    Participant

    @raphadko

    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)
  • Profile photo of raphadko
    raphadko
    Participant

    @raphadko

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

    Profile photo of modemlooper
    modemlooper
    Moderator

    @modemlooper

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

    Profile photo of danbpfr
    danbpfr
    Participant

    @chouf1

    @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 !

    Profile photo of modemlooper
    modemlooper
    Moderator

    @modemlooper

    It’s not a bug.

    Profile photo of Ben Hansen (ubernaut)
    Ben Hansen
    Participant

    @ubernaut

    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.

    Profile photo of modemlooper
    modemlooper
    Moderator

    @modemlooper

    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.

    Profile photo of Ben Hansen (ubernaut)
    Ben Hansen
    Participant

    @ubernaut

    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.

    Profile photo of modemlooper
    modemlooper
    Moderator

    @modemlooper

    Profile photo of raphadko
    raphadko
    Participant

    @raphadko

    @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?

    Profile photo of modemlooper
    modemlooper
    Moderator

    @modemlooper

    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

    Profile photo of raphadko
    raphadko
    Participant

    @raphadko

    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?

    Profile photo of raphadko
    raphadko
    Participant

    @raphadko

    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