CodeIgniter - Image Validation & Thumbnailing

Posted by Sebhael on Stack Overflow See other posts from Stack Overflow or by Sebhael
Published on 2011-01-01T23:11:48Z Indexed on 2011/01/01 23:54 UTC
Read the original article Hit count: 193

I'm currently trying to create a function that validates and creates thumbnails for images on upload - but I'm quite lost on what I'm doing. I'm assuming I'm off on my terminology so I'm not really getting any search results to help point me in the right direction.

My playground is a form with 6 upload fields that are required. One of these fields is for a simple 32x32 icon image, another a portrait orientation (most likely) photo, and then 4 standard desktop screenshots -- and I'm using CodeIgniter as my framework.

I would like to create a function that validates/thumbnails images, and only have to call it on the validation if at all possible. I know I can achieve this per-image, since the documentation for CI is quite through on this - but to reduce redundancy I'm looking for the better option. Outside of that, I don't even actually understand in full how to manipulate images unless it's just $this->input->post('field') - then calling all functions onto this?

I don't know, I'm confused and posting on the actual CI forums has yielded me nothing - so all I'm really looking for is a point in the right direction to understanding what I'm trying to achieve here. This also all might not make any sense, I know it doesn't to me - but I can explain more if needed.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about validation

Related posts about codeigniter