![]() |
![]() |
|
Current Projects: PHP on XP Guide — NFO Viewer — Easy Reflections — Photon Storm — HotWire — FileGlider
Tuesday, March 13. 2007Easy Reflections v3Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
I agree with Brendon, very nice job. Always nice to see little freebie scripts like this one, gave you a plug and looking forward to seeing what else you come up with in the future.
Very nice script.
Try foreshortening the returned image. I have found that grabbing 2X the desired height, then resizing to the original height before returning the image looks more like a reflection.
Thanks for sharing your work.
#3
on
2007-06-20 01:36
I have used the reflection.js on my site but I would like to try this php script. Not to sharp on the technical stuff...so I ask: Do I put my image in the [' img '] in the two lines below?
if (isset($_GET['img']))
$source_image = $_GET['img'];
Is there anything else I need to do if default is my starting point?
Thanks for your help...Ron
This doesn't work correctly in Internet Explorer 6 of course because it doesn't support 24-Bit PNG alpha transparency. So I tried different PNG alpha fixes for ie6. However, this script will only work with those fixes if you put the height parameter first, otherwise the background will still be gray:
Maybe this is helpful to someone. Anyhow, a very nice script!
#5
on
2008-01-14 09:39
Hi - Most IE PNG fixes I've seen that use JavaScript and DOM checking for image tags only work if the element has been assigned a fixed height, either via CSS or within the img tag itself, which is most likely what you are experiencing here.
it does not work too.
help me please... i ever used so much png fix tools...
#5.2
on
2008-06-16 15:49
if original picture is a jpg file, and not a png file, then you can't fix this..
i want to know the Solution.
#5.3
on
2008-06-17 01:33
Have you ever try to integrate it with phpThumb?
#6
on
2008-03-21 18:54
hi
i'd like to use your script for a js image carousel but i need the src img to be "img/img.jpg" style. How can i apply the reflection calling your script once (ie not like: "reflect.php?/img/img.jpg").
Thanks
Vitto
#7
on
2008-04-14 09:13
Hi....very good this script...
but..
how I can use images from mysql database :(
tks
hi...
how I can use reflections with images stored in mysql database..
tks
you can use an php file that reads the image from the database and outputs it.
then you can do something like this:
eflect_v3.php?img=dbimage.php?imageid=12
i love to use a rewrite rule to create nicer url's:
RewriteRule ^/reflections/(.*).png /eflect_v3.php?img=dbimage.php?imageid=$1
email me if you need help with the rewrite!
thank you for this script.
it looks not transparent in ie6 . and pngfix.js is not work for picture.
#10
on
2008-06-16 08:40
i put the height parameter first
but the bg still show gray in ie6....
#11
on
2008-06-16 16:34
can you sent me an SQL dump of your database tabled and the records so i can try it out for myself
btw does directly loading dbimage.php work? (so without the mod rewrite)
Hi Richard, nice script.
Here's some code you could add if you want to merge the original and the reflection like in version 2.x but with alpha transparency:
$finaloutput = imagecreatetruecolor($width, $height+$new_height);
imagesavealpha($finaloutput, true);
imagealphablending($finaloutput, false);
// sets background to transparent
$transparentColour = imagecolorallocatealpha($finaloutput, 0, 0, 0, 127);
imagefill($finaloutput, 0, 0, $transparentColour);
imagecopy($finaloutput, $source, 0, 0, 0, 0, $width, $height);
imagecopy($finaloutput, $output, 0, $height, 0, 0, $width, $new_height);
$output = $finaloutput;
/*
----------------------------------------------------------------
Output our final PNG
----------------------------------------------------------------
*/
#13
on
2008-08-05 15:26
I always create the alpha code, But I do not the code that I created before. How can it be possible?
Hi. Nice work.
I have a problem.
I try to copy like that:
copy("reflect_v3.php?img=image.jpg","img/reflect.png");
And I can't do it.
Wath is the best way to do this?
The error is:
Warning: copy(reflect_v3.php?img=image.jpg) [function.copy]: failed to open stream: No error in D:\wamp\www\mail\functions.php on line 49
functions.php is in the same directory than reflect_v3.php.
Thank you.
#15
on
2009-05-01 20:45
The author does not allow comments to this entry
|
My AS3 Blog
Photon Storm Great PHP links
C7Y PHP Podcast CorePHP is hosted by |