image handling changes

Status: finished.
This is a bugfix release with a limited set of new features.

Moderator: And_One

Krisstoffer
Newbie
Posts: 19
Joined: Wed Feb 16, 2011 3:49 pm

image handling changes

Postby Krisstoffer » Tue Apr 19, 2011 4:42 pm

It would appear and I assume this is a recent change in the repository, only as I'm only noticing it now this evening and I try to keep a relatively fresh install anyway! Looks like images are now being base64 encoded:

Code: Select all

$ret .= '<img src="data:image/'.$format.';base64,'. base64_encode($pic); 


If i read right it's something to do with performance, however this presents another issue for folks like myself whom mostly use png's for there transparency and lighter filesize basically and I assume this is due to the an error and not the intended process but it looks like all images are being output as JPG's which of course is a complete nightmare as transparency is now rendered as a black and white nightmare (see screenshot)
2011-04-20_0335.png

I've layered the start of the 'url' for the image which as you can see appears to encode it as a JPG furthermore when you decode the base64 entry you'll get something along the lines of:
<CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100
included in the output confirming not only that the wrong image format is being used but also that the highest quality level is being used - if this is fixed already then woops.. i did search if not some idea about best road forward would be great - thanks!
You do not have the required permissions to view the files attached to this post.

Krisstoffer
Newbie
Posts: 19
Joined: Wed Feb 16, 2011 3:49 pm

Re: image handling changes

Postby Krisstoffer » Tue Apr 19, 2011 5:03 pm

Firstly please forgive my lazyness, after a little looking I ran across this fix for IE8 (ab)users - one mans fix is another mans ugly: http://bugtracker.joomleague.at/redmin ... common.php

basically changing the type back to PNG fixed things up - also seems to work fine in IE9, on a personal note from experience with another project Joomla related (which i do support for (DOCman)) this sort of issue could be easily passed off for the main template to handle (imho) although from memory IE8 has issues with paths too (i.e they require a forward slash /images/blah.png rather than images/blah.png)

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: image handling changes

Postby timoline » Tue Apr 19, 2011 5:36 pm

I already changed it to png in GIT
Joomla 1.5.x
Joomleague 1.5.....latest git version

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3609
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: image handling changes

Postby And_One » Tue Apr 19, 2011 8:18 pm

timoline wrote:I already changed it to png in GIT


i had to revert that coz of PNG images wont render correct in IE8 (IE + PNG nightmare). JPG seems to be fine all browsers, with the problem of losing the transparency. I dont know what the best solution is with the used libary here.

User avatar
timoline
Joomleague Core Developer, Donator
Joomleague Core Developer, Donator
Posts: 3331
Joined: Thu Mar 12, 2009 8:03 am
Contact:

Re: image handling changes

Postby timoline » Tue Apr 19, 2011 8:59 pm

And_One wrote:
timoline wrote:I already changed it to png in GIT


i had to revert that coz of PNG images wont render correct in IE8 (IE + PNG nightmare). JPG seems to be fine all browsers, with the problem of losing the transparency. I dont know what the best solution is with the used libary here.


hmmm, I must have missed that:)
Joomla 1.5.x
Joomleague 1.5.....latest git version

Krisstoffer
Newbie
Posts: 19
Joined: Wed Feb 16, 2011 3:49 pm

Re: image handling changes

Postby Krisstoffer » Wed Apr 20, 2011 2:07 am

Just to add to the problem, the Data URI stream in general is likely going to cause further problems :
  • Internet Explorer through version 7 (approximately 15% of the market as of January 2011), lacks support.
  • Internet Explorer 8 limits data URIs to a maximum length of 32 KB

User avatar
kubik
.
Posts: 618
Joined: Tue Nov 03, 2009 7:20 pm
Joomleague version: 2.0.x
Location: Oberschlesien
Contact:

Re: image handling changes

Postby kubik » Sun Apr 24, 2011 8:35 pm

Krisstoffer wrote:Just to add to the problem, the Data URI stream in general is likely going to cause further problems :
  • Internet Explorer through version 7 (approximately 15% of the market as of January 2011), lacks support.
  • Internet Explorer 8 limits data URIs to a maximum length of 32 KB

Same problem with Firefox 4.0...
blackedpng.JPG

:confused:
You do not have the required permissions to view the files attached to this post.
Joomla 2.5.x & 3.x
JoomLeague - Latest Git Version
GG Network No : 5739578
www.RegioLiga.pl

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3609
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: image handling changes

Postby And_One » Sun May 01, 2011 11:04 pm

i have added a new global joomleague setting where you can define how the images should be rendered. Possible options: GIF, JPG, PNG.

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3609
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: image handling changes

Postby And_One » Tue May 24, 2011 7:07 pm

implemented in latest git.


Return to “1.5.1-daniela (Beta 1)”

Who is online

Users browsing this forum: No registered users and 1 guest

cron