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
Fit to screen image efekt

 
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
Astarte



Joined: 17 Apr 2006
Posts: 2

PostPosted: 17.04.2006 23:01    Post subject: Fit to screen image efekt Add user to your forum ignore list Reply with quote

Prije svega veliki pozdrav i oprostite ako sam postavio pitanje koje je bilo .(smurfo sam forumom i searvho ali nigdje nisam nasao).

Zanima me zna li tko koju skriptu koja bi omogucila za slike FIT TO SCREEN.
Radim nekakvu stranicu koja bi imala galeriju a uplodane slike bi bilo gro velike pa kada ih se otvori da se prvo slika previewa u velicini ekrana a tek kada kliknete na nju da se poveca na orginalnu velicinu... nes kao na imageshacku kada upldate sliku i odna je previewate...

Hvala puno!
Back to top
View user's profile Send private message
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 18.04.2006 15:13    Post subject: Add user to your forum ignore list Reply with quote

Pa... prvo ti treba server-side skripta koja radi output slike na veličini koju tražiš recimo GET parametrima.

Onda ti treba client-side skripta koja očita canvas size iz browsera i zatraži sliku sa servera, generirajući width i height GET parametre.

Sad, ako radiš sa PHP, pogledaj GD (ili ImageMagick) funkcije.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
retro_one



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

PostPosted: 18.04.2006 15:20    Post subject: Add user to your forum ignore list Reply with quote

Code:
<img src="src.jpg" style="width: 100%; height: 100%" alt="" />


Cool

_________________
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: 18.04.2006 15:46    Post subject: Add user to your forum ignore list Reply with quote

budalo Laughing
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ivan Podrug - e1



Joined: 15 Apr 2005
Posts: 316
Location: Solin

PostPosted: 19.04.2006 10:00    Post subject: Add user to your forum ignore list Reply with quote

ima i jedna flash varijanta. Ako se kužiš u AS moga bi je lako adaptirat za svoje potrebe.

Zoomify. http://www.zoomify.com/
Back to top
View user's profile Send private message
Astarte



Joined: 17 Apr 2006
Posts: 2

PostPosted: 19.04.2006 12:03    Post subject: Add user to your forum ignore list Reply with quote

Nisam uspio rijesiti problem... svjedno hvala na trudu !!!!
Back to top
View user's profile Send private message
Valentin



Joined: 06 Mar 2004
Posts: 22
Location: Samobor

PostPosted: 03.05.2006 11:46    Post subject: Add user to your forum ignore list Reply with quote

mozda ti ovo pomogne? popup koji se prilagodi slici i obrubi je bez grdog okvira (primjer: http://croatianvacation.net/galerija-ostalo.htm - klik na manje thumbnailove)

pozivanje linka
Quote:
<a href="javascript:popImage('folder/ime-slike.jpg','komentar')">


javaskripta:
Quote:

PositionX = 100;
PositionY = 100;
defaultWidth = 600;
defaultHeight = 600;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no ,width='+defaultWidth+', height='+defaultHeight+', left='+PositionX+', top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}'); writeln('function doTitle(){document.title="'+imageTitle+'";}'); writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage(); doTitle(); self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage(); doTitle(); self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close(); }}


PositionX = 100;
PositionY = 100;
defaultWidth = 600;
defaultHeight = 600;
mozes mijenjati vrijednosti (600 je max vrijednost koju sam postavio, tj. moja najveca slika je dimenzija 600 X 600)
Back to top
View user's profile Send private message
gog



Joined: 18 Jun 2004
Posts: 679
Location: zagreb

PostPosted: 03.05.2006 18:47    Post subject: Add user to your forum ignore list Reply with quote

Bilo bi ok da onima bez JS-a serviraš običnu sliku...
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 18:57    Post subject: Add user to your forum ignore list Reply with quote

Applause tako se govori

dodaj normalno HREF na link a javascript onclick neka vrati false -- i to je to
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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