Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation Class ... can you get image properties before processing?
#1

[eluser]skattabrain[/eluser]
So the manual states that this library can do 5 things ...

* $this->image_lib->resize()
* $this->image_lib->crop()
* $this->image_lib->rotate()
* $this->image_lib->watermark()
* $this->image_lib->clear()

i'm currently taking 1 large source photo and make several versions ... tiny, thumb, small, med, large and i then preserve the original.

but, what i want to do is to first get the source file's properties (image and width). if my settings for "large" are larger than the source, there is no point in doing any resize. my code so far works perfectly, minus a function to check to see if processing is needed.

is there an out of the box solution to this that i'm missing?
#2

[eluser]skattabrain[/eluser]
actually ... seeing this comes from an upload directly ... i can use the upload properties. $this->upload->data()

but if this wasn't the case ... what to do?
#3

[eluser]Seppo[/eluser]
There is nothing wrong with the PHP native getimagesize
#4

[eluser]skattabrain[/eluser]
nice, never even heard of that function ... thanks!




Theme © iAndrew 2016 - Forum software by © MyBB