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
PHP image creation

 
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 -> Server-side
View previous topic :: View next topic  
Author Message
fiumar



Joined: 21 Jun 2008
Posts: 5

PostPosted: 21.06.2008 20:39    Post subject: PHP image creation Add user to your forum ignore list Reply with quote

Pozdraf svima,

Ovako... da se odmah razumjemo imam znanje i iskustva s PHP-om te MySQL bazama... no odlucio sam malo i naucit radit s funkcijama za slike..

pa bi me zanimalo dali tko ima kakav primjerak (da radi) kako na neku sliku koja postoji (koja je npr. uplodana) staviti preko nje (horizontalno) neku crtu debljine 20px koja ce biti prozirna npr. 30% i neke odredene boje?

Ili ako me mozete uputiti na neki tutorial jer sam ja trazio i nasao par stvari no ne rade kako treba (iako je doslovno za test samo kopiran kod)...

kakvi prijedlozi koje funkcije da koristim za to?

unaprijed zahvaljujem! Smile

pozdraf!
Back to top
View user's profile Send private message Send e-mail
emptyhead
mi3.crew


Joined: 03 Sep 2003
Posts: 889
Location: Daleko od Novog Zelanda

PostPosted: 22.06.2008 03:16    Post subject: Add user to your forum ignore list Reply with quote

http://php.net/imagick
Back to top
View user's profile Send private message Visit poster's website
fiumar



Joined: 21 Jun 2008
Posts: 5

PostPosted: 22.06.2008 12:02    Post subject: Add user to your forum ignore list Reply with quote

hvala,ali znam za to... ali ja neznam koristit to.. tu je problem... pa mi trebaju nekakvi primjeri Smile

hvala!
Back to top
View user's profile Send private message Send e-mail
fun.ky



Joined: 05 Jan 2006
Posts: 365
Location: Mostar

PostPosted: 22.06.2008 17:08    Post subject: Add user to your forum ignore list Reply with quote

Odaberi šta želiš uraditi i klikni na tu funkciju, tu imaš primjere upotrebe + čitaj komentare...

_________________
There is no style definition for good music!
Back to top
View user's profile Send private message Visit poster's website Twitter profile
fiumar



Joined: 21 Jun 2008
Posts: 5

PostPosted: 22.06.2008 18:12    Post subject: Add user to your forum ignore list Reply with quote

.. si kliknuo/la na taj link?

odaberi neku funkciju.. npr. http://www.php.net/manual/en/function.imagickdraw-setfillopacity.php

... di vidis komentare? Razz

rekao sam da znam radit s php-om tj. u prijevodu koristim se php.net-om itd.. sad sam odlucio naucit radit grafiku malo s php-om... i zapeo sam tu kod stavljanja prozirnosti jer nemogu naci nikakav primjer kako stavit tocno prozirnost...
Back to top
View user's profile Send private message Send e-mail
Moebius



Joined: 26 Jan 2004
Posts: 245
Location: zagreb

PostPosted: 22.06.2008 20:10    Post subject: Add user to your forum ignore list Reply with quote

http://www.php.net/manual/en/imagick.examples.php
Ne koristim php, al ovo mi se cini dovoljno jasnim primjerom.
Back to top
View user's profile Send private message Visit poster's website
fiumar



Joined: 21 Jun 2008
Posts: 5

PostPosted: 22.06.2008 21:10    Post subject: Add user to your forum ignore list Reply with quote

hvala svima na pomoci! Ali to nije to.. ja znam napraviti thumb, znam dodati boju, liniju..ali problemi nastanu kad trebam napraviti da ta linija postane prozirna za odredeni broj... a za to nikako da nadem tutorial koji radi ili barem ima dobro pojasnjeno Sad
Back to top
View user's profile Send private message Send e-mail
emptyhead
mi3.crew


Joined: 03 Sep 2003
Posts: 889
Location: Daleko od Novog Zelanda

PostPosted: 23.06.2008 06:24    Post subject: Add user to your forum ignore list Reply with quote

http://www.php.net/manual/en/imagick.examples.php

primjer #3: Example #3 Creating a reflection of an image

http://www.php.net/manual/en/function.imagick-setimageopacity.php + The level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.

Theorycraft

Ucitas sliku:
$SLIKA = new Imagick("test.png");

Kreiras novu sliku za tu tvoju prozirnu traku:
$TRAKA = new Imagick();

Dimenzija width = width original slike, height = 20px:
$TRAKA->newPseudoImage($SLIKA->getImageWidth(),20 ,"ŽELJENA BOJA");

Dodaj transparenciju traci (30%):
$TRAKA->setImageOpacity( 0.3 );
----> upozorenje: Requires ImageMagick 6.2.9 or later

Zaljepi tu traku po y sredini original sliku:
$SLIKA->compositeImage($TRAKA, imagick::COMPOSITE_OVER, 0, $SLIKA->getImageWidth()/2-10);

Gotov? Gotov.
$SLIKA->writeImage('test.png');

Ako ne radi, nema ti druge nego otvorit svaku sliku u fotoshopu i rucno (jer neces ni akcije moc skuzit) preljepit te trake preko.
Back to top
View user's profile Send private message Visit poster's website
fiumar



Joined: 21 Jun 2008
Posts: 5

PostPosted: 23.06.2008 11:14    Post subject: Add user to your forum ignore list Reply with quote

puno hvala!!! Smile od srca Wink
Back to top
View user's profile Send private message Send e-mail
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 -> Server-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