Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-03-27 01:49:43

london567
Plugin Author
Registered: 2005-02-13
Posts: 6
Website

ja_browser_png: PNG browser transparency

PNG browser transparency plugin

About PNG

Portable Network Graphics (PNGs) is a highly compressed image format which has many advantages over other image formats such as being free from patents and very high quality. However Internet Explorer seems to give unexpected results after showing transparent PNG, which include a nasty dark background.

About ‘ja_browser_png’ plugin

The ja_browser_png textpattern plugin is designed to display transparent PNG images in Internet Explorer as well as other browsers. To call the plugin simply use the ‘picture’ attribute to point to the transparent PNG image you wish to show, for example see below:
<txp:ja_browser_png picture=’/images/7.png’ />

Download ‘ja_browser_png’ plugin

To download the ja_browser_png plugin, please click:
http://jaspaul.com/ja_browser_png.zip

This is my first ever plugin, hopefully the more I use this CMS, the more plugins I can provide and share :). You are very welcome to provide feedback and improvements over this plugin.

Jaspaul Aggarwal
Jaspaul.com

Last edited by london567 (2005-03-27 01:59:42)

Offline

#2 2005-03-27 13:31:28

ebits
Member
From: Ontario Canada, near Toronto
Registered: 2005-01-09
Posts: 10
Website

Re: ja_browser_png: PNG browser transparency

Very cool, i’ll probably use this in the future, thanks :)

Offline

#3 2005-03-27 13:51:51

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: ja_browser_png: PNG browser transparency

Yep, nice plugin.

Any idea how to apply it to the Style Sheets (CSS) in TXP ?

Offline

#4 2005-03-27 16:23:31

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: ja_browser_png: PNG browser transparency

Does this use a javascript function to force IE to run the alpha image loader?

@Jeremie: are you wanting that so transparent background images will work? Because I really don’t recommend using PNG images for layout purposes because they don’t respond correctly, color-wise, in all browsers. They look different from mozilla to internet explorer to safari to opera. Each takes the colors slightly differently.

Offline

#5 2005-03-27 16:41:51

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: ja_browser_png: PNG browser transparency

I wanted to know is there was some way to use the plugin on images loaded via a CSS. Like background image yes for example.

Offline

#6 2005-03-27 19:20:17

london567
Plugin Author
Registered: 2005-02-13
Posts: 6
Website

Re: ja_browser_png: PNG browser transparency

Hi Guys and Gals,

It was very flattering to hear from your replies. Basically, I used no Javascript and let the server handle the png. The reason is I have used the Javascript method provided by many (most popular Javascript method by ‘Alistapart.com’) and It is very heavy (with over 140 lines of code), conflicts with other scripts and when Javascript is disabled it makes a very big mess on the page.

For the moment I don’t think you can use Textpattern components in CSS. However, you can apply it inside the pages. This is a blessing in disguise however as a friend stored ‘all’ chunky images inside his external CSS and the results were that the images began downloading 5 seconds after the page had finished loading as the user downloads the page first and then all the images in the CSS (regardless of whether they are used on the necessary page) after.

Anyway, if you wish to use the plugin, just apply it to the style attributes inside tags. For example:

&#60;div style=’&#60;txp:ja_browser_png picture=’/images/7.png’ /&#62;’ &#62;

Alternatively set the transparent images to load inside the head tag as this accepts components. For example:

&#60;style type=“text/css” &#62;

#container{ &#60;txp:ja_browser_png picture=’/images/7.png’ /&#62;
}

&#60; / style &#62;

Many thanks for the interest in my plugin and it ill be great if you would want to contribute to this plugin and add more features so others may take advantage too.

Jaspaul Aggarwal

Offline

#7 2006-08-20 14:40:56

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: ja_browser_png: PNG browser transparency

Hello

I would be interested in a plugin that would scan the page and then could automatically display transparency for IE on every png found in the page.

Something like this

Does anyone think it’s possible ?

Thanks

Last edited by Niconemo (2006-08-20 14:41:53)


Nico

Offline

#8 2006-08-20 14:52:09

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: ja_browser_png: PNG browser transparency

I would be so happy if there were a plugin like that.


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#9 2006-08-20 15:22:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: ja_browser_png: PNG browser transparency

alicson wrote:

I would be so happy if there were a plugin like that.

I’m with ya! The link posted above also supports background images so it provides with a more complete solution to the problem.

london567 is there a way you can implement that for txp?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2007-03-20 16:08:59

literax
New Member
Registered: 2007-03-18
Posts: 1
Website

Re: ja_browser_png: PNG browser transparency

london567 wrote:

h2. PNG browser transparency plugin

About PNG

……………………………………………………………………………………………………………………………………………………………..However Internet Explorer seems to give unexpected results after showing transparent PNG, which include a nasty dark background…………………………………………………………………………………………………..

Solved in IE 7.

Offline

#11 2007-07-11 17:26:30

zenigy
Archived Plugin Author
From: San Diego, Ca
Registered: 2007-07-09
Posts: 4

Re: ja_browser_png: PNG browser transparency

Just made a plugin from Justin Koivisto’s script. See the thread here.

Offline

Board footer

Powered by FluxBB