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:
thank you!
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 {
Viewing 15 lines of 23 lines. View entire code block.
thank you!
hi
thank you for your feedback!
i will send the screenshot but actually the background is just black instead of transparent?!
thank you for your feedback!
i will send the screenshot but actually the background is just black instead of transparent?!
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?
thank you!
could be something like this...
here's a picture attached – still a png.
could be something like this...
here's a picture attached – still a png.
@eivissa89
Can you attach the original image please.
Can you attach the original image please.
hi
that's the original one:
that's the original one:
@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...
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...
cool, so i just need to wait for the update?
thank you very much!
thank you very much!
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.
any idea when the new version will be available?
otherwise i have to go one version back and that would be pretty bad.
@eivissa89
I have a feeling it might be soon.
I have a feeling it might be soon.
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.