Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2] 3   Go Down

Author Topic: issues with transparent background for PNG and/or GIF files  (Read 23696 times)

0 Members and 1 Guest are viewing this topic.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #20 on: January 31, 2014, 04:21:40 pm »

I don't know how to summarize my problem any better than in my op. 

I don't understand some of the discussion from Phill Lockhurst and gmc, so it's hard for me to clearly understand what they might or might not be on to.  So I apologize, but I can't clarify their discussion for you.

Maybe you could read through my op again, and for the moment, ignore their discussion.  Maybe it will be more clear that way?  If you don't understand my op, please feel free to ask.

(Still waiting for my new isp to take over.  Good chance I'll lose my connection any time now.  But hopefully I'll be back soon, whenever it happens  :o  :o)

____________
In case it matters.  And for the part of their discussion that I do understand:
For gmc, I've created a 2nd temporary album (http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=28) and uploaded Phill's lower bit PNG as both the original and the custom thumb.  The original appropriately displayed the bg, before the custom thumb was applied.  And it still is correct bg after custom thumb is applied.

However, it looks like Phill had taken a thumbnail from my album, rather than the full size PNG.  I'm not sure if it makes for a fair test, to use a thumbnail.  I guess if he took it from my PNG original, it should be fine.  But if he took it from one with the black bg, it might not be good to use for testing.

Even though Andre said it should not matter whether the original image is an SVG or not, I still wonder, based on my first experience (memorialized in the linked reference topic above).  So in this 2nd temporary album, I uploaded again, my original mand2.svg.  Then I applied Phill's low bit PNG as the custom thumbnail.

You can see, that even though I used the same PNG (Phill's low bit) as the custom thumb, on both images, Phill's low bit PNG as the original shows a correct bg for the custom thumb, and my mand2.svg as the original shows the black background.

So I learn 2 things from this:

1 -- The Custom Thumbnail plugin does behave differently when the original is an SVG.
and
2 -- The low bit color does not fix the problem.

This is only valid if Phill's low bit PNG came from my original PNG upload.  If he took it from one with the black bg, might not be fair test.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #21 on: January 31, 2014, 04:30:10 pm »

So I learn 2 things from this:

1 -- The Custom Thumbnail plugin does behave differently when the original is an SVG.
and
2 -- The low bit color does not fix the problem.

This is only valid if Phill's low bit PNG came from my original PNG upload.  If he took it from one with the black bg, might not be fair test.

Re:  1 -- The Custom Thumbnail plugin does behave differently when the original is an SVG. 

Edit:

BUT it only is happening with THIS mand2.svg using mand2.png as the custom thumbnail.

Note in this album:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=18, the image titled kal-2.svg.  For it's custom thumb, I used kal-2.png.  And you can see that there is no black bg there.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #22 on: January 31, 2014, 05:44:34 pm »

Attached are the same files I did the above tests with.  (zipped)
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: issues with transparent background for PNG and/or GIF files
« Reply #23 on: January 31, 2014, 06:08:34 pm »

So let me get this straight, with the PNG I supplied it works OK. With the PNG from your SVG file it does not correct?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #24 on: January 31, 2014, 07:12:51 pm »

So let me get this straight, with the PNG I supplied it works OK. With the PNG from your SVG file it does not correct?

No.

Is there something wrong with my English?  I'm sorry, it's all I know.  I'm not sure how many different ways I can explain the same thing.  If I'm using the wrong terminology somewhere, please tell me what the correct terminology is.  After all, I do want to make it as easy as possible for you  :)

If I upload your low bit PNG as the original image, (which looks ok) and then I use your same low bit PNG as the custom thumbnail, it looks ok.

If I upload my SVG (mand2.svg) as the original, and then I use your same low bit PNG as the custom thumbnail, it gets a black background.  (It also gets a black bg if I use my mand2.png as the custom thumb.)

You can see the results here:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=28

Note that so far, the problem is only happening when mand2.svg is used as the original and mand2.png is used as the custom thumbnail.

Note in this album:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=18, the image titled kal-2.svg.  For it's custom thumb, I used kal-2.png.  And you can see that there is no black bg there.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #25 on: January 31, 2014, 07:18:20 pm »

Note that so far, the problem is only happening when mand2.svg is used as the original and mand2.png is used as the custom thumbnail.

Edit:

It happened with another SVG, when I first posted the other topic, but I thought the problem was solved and deleted it.  And now, I can't remember which one it was.  But I could try uploading all the images that I remember using, and maybe I will find it.  If that would be helpful for you to have 2 examples, I don't mind trying.  Lmk :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #26 on: February 04, 2014, 04:56:31 pm »

If I upload my SVG (mand2.svg) as the original, and then I use your same low bit PNG as the custom thumbnail, it gets a black background.  (It also gets a black bg if I use my mand2.png as the custom thumb.)

I just downloaded your test_files.zip file. Then, I uploaded mand2.svg and used the custom thumbnail plugin to apply first brynns_original_mand2.png and then PLs_lowbit_mand2.png as custom thumbnail, while creating an intermediate-sized version each time. All created files have a transparent background.

Can somebody confirm that behavior please? Thanks.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: issues with transparent background for PNG and/or GIF files
« Reply #27 on: February 04, 2014, 07:41:48 pm »

Yes, I get the same as Andre.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #28 on: February 05, 2014, 09:13:29 am »

brynn, please test again with exactly the same steps I just posted. To avoid any unexpected file name collisions, please upload the test SVG file to a separate directory in your albums directory and add it via batch-add. I assume you'll get the same result as Phill and me. If so, I already have an idea what may happened.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #29 on: February 06, 2014, 03:09:59 am »

Ok, glad to :)

Couple questions.

Quote
Then, I uploaded mand2.svg and used the custom thumbnail plugin to apply first brynns_original_mand2.png and then PLs_lowbit_mand2.png as custom thumbnail, while creating an intermediate-sized version each time.

Do you mean that you applied brynns_original_mand2.png, as custom thumb, to mand2.svg, and then applied PLs_lowbit_mand2.png, as custom thumb, to the same mand2.svg?  Or did you upload mand2.svg twice, applying brynns_original_mand2.png, as custom thumb, to one, and PLs_lowbit_mand2.png, as custom thumb, to the other?

Since I've never used batch-add, I had to read up on it in the manual.  Do you mean that you want me to upload the images from test_files.zip using my SFTP, and then perform the batch-add?  Or do you mean to upload via html (which is how I have been doing it all along) and then perform the batch-add?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #30 on: February 06, 2014, 09:12:17 am »

Do you mean that you applied brynns_original_mand2.png, as custom thumb, to mand2.svg, and then applied PLs_lowbit_mand2.png, as custom thumb, to the same mand2.svg?
Yes, I did exactly as I wrote.


Do you mean that you want me to upload the images from test_files.zip using my SFTP, and then perform the batch-add?
Yes.


upload via html (which is how I have been doing it all along) and then perform the batch-add?
That's not possible, at least not with Coppermine's built-in features.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #31 on: February 06, 2014, 11:16:57 am »

Ok, bearing in mind that I don't clearly understand what you're thinking and why I'm doing these steps, I've done my best to follow instructions.

I uploaded mand2.svg, brynns_original_mand2.png, and PLs_lowbit_mand2.png to a new folder (created using Bitvise SFTP) in public_html/ic_gallery/albums called testftp.  Then I used Batch-Add and added them to brand new album "3rd_temporary_test" album.  Success so far.

The next part I might not have done right.  I opened the intermediate page of mand2.svg, and used Custom Thumbnail button to apply brynns_original_mand2.png.  The reason I'm not sure that's right, is because that custom thumbnail uploads the PNG from my computer, and not from the batch-added PNG.  I don't know how to get it from the ftp uploaded PNGs.

But leaving aside my doubts for the moment, the result of that was a black background on the new custom thumbnail, and correctly sized and background intermediate.  Next I clicked Custom Thumbnail button again, and applied the other PNG.

And I apologize, but I might have forgotten to check intermediate for the 2nd PNG.  I can do this all again tomorrow, if necessary, if not checking intermediate has ruined the test.  But I have to log off right after I post this, and won't be back until tomorrow night or Friday.

So anyway, after applying the 2nd custom thumb, I have a custom thumbnail with a black background, and and intermediate that's the size of a thumbnail, and also has a black background.  (That's what makes me think I might have forgotten to check intermediate.  Actually, I thought I did check it.  But the thumb sized intermediate makes me wonder.)

And you can see the final result here:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=29

Oh!  I can find out if I checked intermediate by looking in the server for it, right?  Hhmm, actually, I'm not sure what I'm looking at, on the server.  There are 3 new images that start with thumb_, but only 1 that starts with normal_.  I would have expected 2 of each, so that's why I'm confused.  But maybe it makes more sense to you?

Anyway, let me know if you want me to do it again.  And again, I apologize for that.  Thanks for all your help, and I'll be back online maybe 18 hours from now (if plans don't change).

All best  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #32 on: February 06, 2014, 11:21:16 am »

I uploaded mand2.svg, brynns_original_mand2.png, and PLs_lowbit_mand2.png
This was already wrong.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #33 on: February 06, 2014, 03:49:40 pm »

My bad.  I'll delete and start over.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #34 on: February 06, 2014, 04:50:54 pm »

Rather than delete files, I made a new folder using my SFTP (in albums dir) and uploaded only mand2.svg.  Then I made another new album (fourth_temp_test) and batch added just that 1 file.

Then I clicked Custom Thumbnail button, selected brynns_original_mand2.png, checked intermediate and clicked Upload.  Result:  thumbnail has black background, intermediate is correct.

Then I clicked Custom Thumbnail button again, selected PLs_lowbit_mand2.png, checked intermediate, and clicked Upload.  Result: thumbnail with black background and intermediate same size and bg of thumbnail.

You can see the result here:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=31.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #35 on: February 06, 2014, 05:10:53 pm »

Please upload a different file type (e.g. a JPG file or PDF file, or even better: both) with a different file name than "mand2" and try again to apply both images as custom thumbnail. I don't see a reason how this should be related to the file type the custom thumbnails are applied to.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #36 on: February 07, 2014, 02:09:06 am »

Do you mean for me to convert mand2.svg to a JPG and also a PDF, change the name, and upload those?  Or do you mean for me to use 2 entirely different images?

Still using ftp and batch-add?
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: issues with transparent background for PNG and/or GIF files
« Reply #37 on: February 07, 2014, 08:59:21 am »

A totally different file type as per Andre above. Any PDF will do.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: issues with transparent background for PNG and/or GIF files
« Reply #38 on: February 08, 2014, 01:09:51 am »

I'm sorry that I have to ask so many questions.  I just don't understand what's causing the problem, or even what might be causing it.  So sketchy requests which might be clear to people with more advanced understanding of how CPG works, are not necessarily clear to me.

For example, I don't understand why me having uploaded 3 images via ftp and batch-add, instead of just 1, should make the test invalid.  So when something like that is so important, I want to make sure exactly what:

"Please upload a different file type (e.g. a JPG file or PDF file, or even better: both) with a different file name than "mand2"...."

means.  I'm also not sure if I should make a new album.  But since he didn't say so, I'll use an existing one.

Ok, I've uploaded a file "tulips.jpg" (which is titled "testing JPG as original") in this album:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=31.  Applying "brynns_original_mand2.png" as first custom thumbnail, I get a thumbnail with a black background, which is the correct width but incorrect height.  So the thumbnail is out of proportion and has black background, while the intermediate is correct size and bg.

Next, applying "PLs_lowbit_mand2.png" as custom thumb, "on top of" the first custom thumb, there is no change in the thumbnail.  It still is out of proportion and has a black bg.  And now, the intermediate is a correctly proportioned thumbnail size, with a black bg.

Uh-oh....oops :-[  I uploaded tulips.jpg via html.  Did you mean for me to use ftp/batch-add?  Just in case, I'll do it that way too.

Ok, you can see the 3rd thumbnail, which is the 2nd mis-proportioned thumbnail, which has no title, (because I didn't see a way to add a title) (except by later editing file info) for "tulips.jpg" which I uploaded via ftp (to brand new folder) and batch-add, in this album:  http://inkscapecommunity.com/ic_gallery/thumbnails.php?album=31.  Then I went through the same routine with custom thumbnails.  No difference in results.  Exactly the same results as html upload.

And now for PDF..... 

Well it looks like I haven't configured properly for PDF.  When I tried to upload a PDF, I got an error message:

"The file you have uploaded is not a valid image!"

So I'll have to figure out how to fix that, if you really need this test with PDF.  Please let me know if you need it right away.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: issues with transparent background for PNG and/or GIF files
« Reply #39 on: February 10, 2014, 11:26:26 am »

This thread took and is already too long to re-read it again every time. However, If I remember correctly you said the transparent background is lost if you apply a picture with transparent background as custom thumbnail, but just for SVG files. You just disproved that, as you got the same result for a JPG file (that's why I asked you to test with different file types than SVG).

Which settings do you use for Method for resizing images? GD2 oder ImageMagick? If you use ImageMagick, does it work as expected if you switch to GD2?

Please also provide a test user account (no admin account!), so we can exclude any client side issues.
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.034 seconds with 20 queries.