Navigation and transparent PNGs

Permalink
hi there

is someone able to help me with this problem? i have included pictures in the autonav (with an attribute), since version 8 the tranparent PNGs don't look like the should anymore. (screenshot attached)

does concrete5 do something different compared to the old version? if i place the picture in a normal way it's not a problem, it's transparent.

here's my code snippet:
$ih = Loader::helper('image');
$img = $ni->cObj->getAttribute('pic_new');
if (count($navItems) > 0) {
   echo '<ul>'; //opens the top-level menu
   foreach ($navItems as $ni) {
      echo '<li>'; //opens a nav item
      $img = $ni->cObj->getAttribute('pic_new');
      if ($img) {
         $thumb = $ih->getThumbnail($img, 1000, 1000, false); //<--set thumbnail width/height here, and change FALSE to TRUE if you want the thumbnail cropped
      }
      echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . '<img src="' . $thumb->src . '" width="' . $thumb->width . '" height="' . $thumb->height . '" class="menu-icon" />' . '</a>';
      echo '<p class="menu-text">' .  $ni->name . '</p>';
      if ($ni->hasSubmenu) {
         echo '<ul>'; //opens a dropdown sub-menu
      } else {


thank you!

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi eivissa89,

What version of concrete5 are you using?

Please attach the screenshots and the PNG images that are not displaying correctly.

A side note, concrete5 version 8.2 will include significant improvements to image handling.
eivissa89 replied on at Permalink Reply
hi

thank you for your feedback!
i will send the screenshot but actually the background is just black instead of transparent?!
Cahueya replied on at Permalink Reply
I believe to remember that I've seen something similar when a PNG is being scaled down in size. It may then be delivered as JPEG... have you checked the actual file that is shown in the nav?
eivissa89 replied on at Permalink Reply 1 Attachment
thank you!
could be something like this...

here's a picture attached – still a png.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@eivissa89

Can you attach the original image please.
eivissa89 replied on at Permalink Reply 1 Attachment
hi

that's the original one:
MrKDilkington replied on at Permalink Reply
MrKDilkington
@eivissa89

I can confirm that the background is black for that image in concrete5 8.1.0.

It displays correctly in version 8.2.0.

The issue may be related to this:
https://github.com/concrete5/concrete5/issues/5032...
eivissa89 replied on at Permalink Reply
cool, so i just need to wait for the update?

thank you very much!
eivissa89 replied on at Permalink Reply
Hi there

any idea when the new version will be available?
otherwise i have to go one version back and that would be pretty bad.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@eivissa89

I have a feeling it might be soon.