Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 10-23-2004, 10:11 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Crop Thumbnails

This mod will create cropped thumbnails that exactly matches the width and height set in the admin panel (the original function uses those as max values, either one).

Good if you like your thumbs to have an exact width and height, whatever size the original image has.

Download from the front page -> extras.

// punK

will only work with version 1.2, not previous versions.
__________________
icq: 66760929
Reply With Quote
  #2  
Old 10-23-2004, 10:37 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
humm...ok, its on there, but it only worked for a few of my photos...

http://www.blinking8s.com/blog/index.php?x=calarchive

im diggin it though, once I get this fixed...hehe
__________________
i should say more clever stuff
Reply With Quote
  #3  
Old 10-23-2004, 10:43 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
something must be wrong.

I'll check it further.

// punk
__________________
icq: 66760929
Reply With Quote
  #4  
Old 10-23-2004, 10:44 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
when i go to regenerate thmbnails (it does this with or without the cropped thumbnail addon)

Code:
Warning: imagejpeg(): Unable to open '../thumbnails/thumb_IMG_0061.jpg' for writing in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): Operation not permitted in /home/blinks/public_html/blog/admin/index.php on line 885

Warning: imagejpeg(): Unable to open '../thumbnails/thumb_IMG_0161.jpg' for writing in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): Operation not permitted in /home/blinks/public_html/blog/admin/index.php on line 885

Warning: imagejpeg(): Unable to open '../thumbnails/thumb_IMG_0967.jpg' for writing in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): Operation not permitted in /home/blinks/public_html/blog/admin/index.php on line 885

Warning: imagejpeg(): Unable to open '../thumbnails/thumb_rocks.jpg' for writing in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): Operation not permitted in /home/blinks/public_html/blog/admin/index.php on line 885

Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): No such file or directory in /home/blinks/public_html/blog/admin/index.php on line 885
any clue?
__________________
i should say more clever stuff
Reply With Quote
  #5  
Old 10-23-2004, 10:53 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Your thumbnails folder is chmod 777 I guess?

Very strange it behaves like that.

// punk
__________________
icq: 66760929
Reply With Quote
  #6  
Old 10-23-2004, 10:58 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
I inserted 57 images, all different sizes and types. Every single thumbnail generated is 100x100 pixels (my settings).

I need more info about your stuff in order to do any educated guesses... :/
Your error is weird to and might have something to do with it all.

// punK
__________________
icq: 66760929
Reply With Quote
  #7  
Old 10-23-2004, 11:02 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
nothing out of the serious norm...

i deleted all the thumbs in the ftp, then regenerated them...all sizes are fine...but still errors, only 2 though

knocked it down to

Code:
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/blinks/public_html/blog/admin/index.php on line 883

Warning: chmod(): No such file or directory in /home/blinks/public_html/blog/admin/index.php on line 885
but i have 7 images posted, it says its creating 8 thumbnails...

tell me the info you need and Ill dig it up, nothing really out of the ordinary though...Im confused...haha

Code:
 imagejpeg($img, "../thumbnails/thumb_$file",$cfgrow['compression']);
    $thumbimage = "../thumbnails/thumb_$file";
    chmod($thumbimage,0644);
lines 883-885
__________________
i should say more clever stuff
Reply With Quote
  #8  
Old 10-23-2004, 11:10 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
It's probably some file that you can't see.
The fault above is regarding one image only, it generates two different errors.
First because its not a valid file (jpg, gif, png) second it can't find the file which is obvious since it wasn't created due to not being a valid file.

Look for hidden files in your images directory, some hidden file or just another file should be there. Or just an index.html file you created so people can't browse the directory.

Only image files should be there, if you need another file in there you can have it and ignore the errors produced.
// punk
__________________
icq: 66760929
Reply With Quote
  #9  
Old 10-23-2004, 11:11 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
this is when you love ms windows, i backed everything up when playing with the script last night, well imessed up a file and just reuploaded th elast backup, but windows inserted a thumb.db file into the image dir and yeah...not cool

haha...

you script works great!

sorry about all that, you can delete the threads if you want...

*edit* we posted at the same time...you hit the nail on the head!
__________________
i should say more clever stuff
Reply With Quote
  #10  
Old 10-23-2004, 11:11 AM
pixelpunk's Avatar
pixelpunk Offline
pixelpost guru
 
Join Date: Oct 2004
Location: Sweden
Posts: 504
Send a message via ICQ to pixelpunk
Your thumbnails are good now, right?
Every one looks good anyway.

// punk
__________________
icq: 66760929
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 07:52 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs