Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
png prikaz za IE

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
vee.jay



Joined: 24 Jun 2004
Posts: 52
Location: croatia

PostPosted: 03.05.2006 16:03    Post subject: png prikaz za IE Add user to your forum ignore list Reply with quote

Kako osigurati da se stranice koje sadrže png fotke (flash) prikažu identično u IE kao i u firefoxu? Opera isto prikazuje tamnije kao i IE, ali mi je bitnije za IE.
Ovako mi sve fotke izgledaju "spaljeno" Sad

_________________
mali studio ... velikih ideja
http://www.malistudio.hr
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 03.05.2006 17:10    Post subject: Add user to your forum ignore list Reply with quote

E. To i mene zanima. Nema veze je li PNG-8 ili -24, činjenica je da u različitim browserima različito izgledaju. Kod mene je slučaj da je u FF dobro dok je IE i Safari tamnije.

Mislim da je to gamma correction koji je jedan od PNG features :S
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lord



Joined: 29 May 2006
Posts: 7
Location: Strasbourg

PostPosted: 29.05.2006 14:15    Post subject: Add user to your forum ignore list Reply with quote

Code:
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
    window.attachEvent("onload", alphaBackgrounds);
}

function alphaBackgrounds(){
    var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
    var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
    for (i=0; i<document.all.length; i++){
        var bg = document.all[i].currentStyle.backgroundImage;
        if (itsAllGood && bg){
            if (bg.match(/\.png/i) != null){
                var mypng = bg.substring(5,bg.length-2);
                document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
                document.all[i].style.backgroundImage = "url('/images/x.gif')";
            }
        }
    }
}


Jedan blanko transparentni .gif fajl 1x1px smesten u folderu "images" ali samo promenite putanju ako zelite da ga premestite na neku drugu lokaciju.
Podrzane su verzije explorera 5.x pa navise. Laughing
Back to top
View user's profile Send private message Visit poster's website
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 29.05.2006 14:27    Post subject: Add user to your forum ignore list Reply with quote

mislim da se ovdje ipak ne radi o transparenciji....nego o razlicitom prikazu boja na slici u razlicitim brozerima

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 29.05.2006 14:53    Post subject: Add user to your forum ignore list Reply with quote

Da... dumbass Razz

Ono što sam ja zaključio: radi se o pogrešnoj interpretaciji 'gamma' feature-a u PNG formatu. Važno je što sejva taj PNG - u Photoshopu nemojte koristiti 'save as' -> PNG nego samo 'save for web'. To znači da ne smijete ni otvoriti već tako spremljeni PNG, editirati ga i staviti 'save' -- osim ako ne znate neki fix kojeg ja nisam našao.

Drugo, background sličice koje bi se trebale preklapati ili slično treba uvijek spremati na isti način. Uvijek nakon spremanja sve provjeriti u IE i Safari
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lord



Joined: 29 May 2006
Posts: 7
Location: Strasbourg

PostPosted: 29.05.2006 14:55    Post subject: Add user to your forum ignore list Reply with quote

retro_one wrote:
mislim da se ovdje ipak ne radi o transparenciji....nego o razlicitom prikazu boja na slici u razlicitim brozerima

Uff u pravu si, sada sam video Mad
Btw. mozda ce ovo pomoci nekome
Back to top
View user's profile Send private message Visit poster's website
unique



Joined: 29 Mar 2004
Posts: 655

PostPosted: 29.05.2006 17:12    Post subject: Add user to your forum ignore list Reply with quote

ovaj sam link neki dan pokupio od mislava Wink
http://attaboymedia.com/sandbox/png-is-crap/

btw. bas mi je zao sto se png tako lose prikazuje Sad

_________________
Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group