*.GIF - Thumbnails
Verfasst: Sonntag 17. Juli 2005, 23:39
Hello all,
habe gerade noch ein wenig in SMARTORS Support für unser integriertes Album geblättert und siehe da:
Mit erscheinen der GD-Version 2.0.28 ist es nun auch möglich, Vorschaubilder für GIF-Bilder und GIF-Animationen automatisch erstellen zu lassen und anzuzeigen.
Schnell noch ein paar Programmänderungen und schon ist es auch bei uns möglich.
Hier die Änderungen:
habe gerade noch ein wenig in SMARTORS Support für unser integriertes Album geblättert und siehe da:
Mit erscheinen der GD-Version 2.0.28 ist es nun auch möglich, Vorschaubilder für GIF-Bilder und GIF-Animationen automatisch erstellen zu lassen und anzuzeigen.
Schnell noch ein paar Programmänderungen und schon ist es auch bei uns möglich.
Hier die Änderungen:
Gruß Uwemarkus_petrux hat geschrieben:Hi all,
First, sorry if this has been already posted, but I only found this thread.![]()
I have been testing the following to use jpegs as thumbnails for GIF images. I have used function imagecreatefromgif (which it seems to me it may work with all PHP/GD versions as it is a read-only function) to read the GIF and then, send the image to the browser as jpeg.
It works for me with automatic thumbnails and generates the cached image as jpeg.
Can anyone confirm if this is a valid approach? ...or am I lucky with my hosting?Code: Alles auswählen
# # ---[ OPEN ]---------------- # album_thumbnail.php # # ---[ FIND ]---------------- # if( ($pic_filetype != '.jpg') and ($pic_filetype != '.png') ) # # ---[ REPLACE WITH ]---------------- # if( ($pic_filetype != '.jpg') and ($pic_filetype != '.png') and ($pic_filetype != '.gif') ) # # ---[ FIND ]---------------- # case '.jpg': header('Content-type: image/jpeg'); break; # # ---[ BEFORE ADD ]---------------- # case '.gif': # # ---[ FIND ]---------------- # case '.jpg': $read_function = 'imagecreatefromjpeg'; break; # # ---[ BEFORE ADD ]---------------- # case '.gif': $read_function = 'imagecreatefromgif'; $pic_filetype = '.jpg'; break; # # ---[ SAVE ]---------------- #
![]()
Thanks