MonkeyCMS Forum

Go Back   MonkeyCMS Forum > Other MonkeyCMS Discussion > General MonkeyCMS Discussion
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2008, 12:00 PM
Colin Colin is offline
Administrator
 
Join Date: Apr 2007
Posts: 1,614
Default Manipulating Images Tutorial

The first draft is here:

http://www.monkeycms.com/content.php...&override=true

Any feedback would be much appreciated. I'll be putting this live soon.
Reply With Quote
  #2  
Old 02-27-2008, 12:25 PM
chrisjlocke chrisjlocke is offline
Super Moderator
 
Join Date: Apr 2007
Location: Essex, UK
Posts: 1,058
Default

Quote:
Secondly you must ensure that this directory is writable by the web server account on your server. This usually involves running the following command via SSH or Telnet on your server:

chmod 755 /path/to/your/image/directory
I suspect most users will only have shared hosting, so won't be able to use a command-line. Might be worth adding that these settings can be set via an FTP client, such as FileZilla. As there are several directories that need this setting, it might warrant a tutorial in itself, so this can point to that. I don't mind doing that.


Quote:
Depending on the image complexity and JPEG quality setting, you may find the image is still indentifiable but it will be next-to-useless for the external site.
Did you mean identifiable?


Quote:
but you want to resize it while reducing filesize and preserving quality, you could add width=200 to the URL to reduce the image width to 200 pixels.
You mention 200 pixels, but the following example is 300 pixels. Consistency, man, consistency! The height example is the same. 200 in the text, but the example shows 150.


Quote:
You can adjust the output quality of the processed images...
Could you just confirm in the 'quality' section what the scale is - I presume 1 (crap) to 100 (original).


In this 'tutorial', no mention was made of caching. If you're generating hundreds of thumbnails, this option is quite important - especially on shared hosting! (The poor server continually processing images! Oops!)
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed
Reply With Quote
  #3  
Old 02-27-2008, 12:33 PM
Colin Colin is offline
Administrator
 
Join Date: Apr 2007
Posts: 1,614
Default

Quote:
Originally Posted by chrisjlocke View Post
I suspect most users will only have shared hosting, so won't be able to use a command-line. Might be worth adding that these settings can be set via an FTP client, such as FileZilla. As there are several directories that need this setting, it might warrant a tutorial in itself, so this can point to that. I don't mind doing that.




Did you mean identifiable?



You mention 200 pixels, but the following example is 300 pixels. Consistency, man, consistency! The height example is the same. 200 in the text, but the example shows 150.



Could you just confirm in the 'quality' section what the scale is - I presume 1 (crap) to 100 (original).


In this 'tutorial', no mention was made of caching. If you're generating hundreds of thumbnails, this option is quite important - especially on shared hosting! (The poor server continually processing images! Oops!)
Cheers Chris - will update now

Caching is now automatic for any image that is processed so I didn't mention it. I may add the option to turn it off though I guess it could fill up server space quickly.
Reply With Quote
  #4  
Old 02-28-2008, 08:25 AM
chrisjlocke chrisjlocke is offline
Super Moderator
 
Join Date: Apr 2007
Location: Essex, UK
Posts: 1,058
Default

Quote:
you could add width=300 to the URL to reduce the image width to 200 pixels.
So would a 'width=400' reduce the width to 300?

The 'Image caching' at the end has two sets of 'Therefore' in quick succession .... but now I'm just being picky!

Looks good!
__________________
http://www.cscomputerservices.co.uk/ | Providing complete computer solutions | Web hosting with MonkeyCMS pre-installed
Reply With Quote
  #5  
Old 02-28-2008, 08:29 AM
Colin Colin is offline
Administrator
 
Join Date: Apr 2007
Posts: 1,614
Default

Doh - will do some tidying
Reply With Quote
  #6  
Old 06-23-2009, 10:12 AM
harvey harvey is offline
Senior Member
 
Join Date: Jun 2008
Posts: 474
Default

I'm working on something which will have content images which could be either landscape or portrait in orientation.

Say I want the images to be displayed in a template within an area 300 pixels x 300 pixels, how can I tell the template to display the image 300 pixels high in the event of a portrait image or 300 pixels wide for a landscape image while maintaining the images original proportion?
Reply With Quote
  #7  
Old 06-23-2009, 10:18 AM
Colin Colin is offline
Administrator
 
Join Date: Apr 2007
Posts: 1,614
Default

Basically you want to resize the longest side to 300?

I don't think it's possible to do at the moment, but I can add it to the next release.
Reply With Quote
  #8  
Old 06-23-2009, 10:20 AM
harvey harvey is offline
Senior Member
 
Join Date: Jun 2008
Posts: 474
Default

Yep, that's what I need!

If it can be done I think it would be really useful.

Any work-around you can think of in the meantime Colin?
Reply With Quote
  #9  
Old 06-23-2009, 10:28 AM
Colin Colin is offline
Administrator
 
Join Date: Apr 2007
Posts: 1,614
Default

Well not a workaround as such, but here's the protectedimage.php file that will be in the next release that now supports this

Just add &largestside=XXX to the image rather than the width/height parameters and it'll resize the image as you need it
Attached Files
File Type: php protectedimage.php (33.6 KB, 2 views)
Reply With Quote
  #10  
Old 06-23-2009, 10:29 AM
harvey harvey is offline
Senior Member
 
Join Date: Jun 2008
Posts: 474
Default

Fantastic! Thanks so much for that Colin, much appreciated
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 03:48 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© Poisonous Monkey