Create thumbnails via API

Permalink
I thought about posting this under features requests, but it's possible that it already exists, so I thought I would post it here first.

From what I understand, C5 automatically generates 3 thumbnails (or maybe 2 thumbnails and the other is the original?) whenever you upload an image...and these are mainly for administrative purpose (displayed in the File Manager and in the file properties page).

What would be awesome is if there was some way to either 1) Create a thumbnail within the CMS itself (like you click on an image in the File Manager and click Create Thumbnail and specify the dimensions or something), or 2) (and this would be what might already exist) if there was some sort of API call to generate a thumbnail. I'm sure this must exist at least to a certain extent, since these original thumbnails are being generated somehow (may not be part of the API though?), but it would be great if there was a function that could resize an image and then actually display it as another image in the file manager.

Any thoughts?

jgarcia
 
jgarcia replied on at Permalink Reply
jgarcia
Oh also - I know there is the Piknik intergration, and forgive me for this, but I'm just not a huge fan of it. Plus, I always seem to have problems connecting when I'm working on a site that I'm running locally.
elyon replied on at Permalink Reply
elyon
Do you mean being able to specify your own dimensions for the thumbnail, or do you mean being able to set your own portion of the image to be used as a thumbnail, rather than shrinking the full image?
jgarcia replied on at Permalink Reply
jgarcia
I mean shrinking the image.
Shotster replied on at Permalink Reply
Shotster
A quick search of the C5 installation revealed a class called ImageHelper in /concrete/helpers/image.php. Might be worth a look.

-Steve
kirkroberts replied on at Permalink Best Answer Reply
kirkroberts
I copied this directly from one of Remo's tutorials:
<img src="<?php echo $imgHelper->getThumbnail($cobj->getAttribute('thumbnail'), 75, 75)->src ?>" alt=""/>


Found at:http://www.codeblog.ch/2009/03/concrete5-templates/2/...

Is that what you meant?
jgarcia replied on at Permalink Reply
jgarcia
Yes! Pretty much, at least. From what I can tell at first glance, this doesn't technically create a file and put it in the file manager, but it does at least generate the image, which is (probably) the more complicated part.

Thanks Kirk and Remo!
antony09 replied on at Permalink Reply
Try 3D Thumbnail Generator to create impressive 3D thumbnails.

http://www.softorbits.com/3d-thumbnail-generator...