I've been wondering on how to resize image and store it into database.
So far, I could store the image into database. Now, I want to create the the thumbnail of relevant image and store it in differently with my actual image.
Let's say, from an image.jpg, I want to store the actual image into file_data (LONGBLOB) and its thumbnail into thumbnail_data (BLOB).
But, I don't know how to resize the image. I've tried several tutorials but nothing works for me.
Please help? Sorry for troubling you guys.
=======================(newly added part)
I was thinking to store the image into database because I need the relation within the data stored in each row.
I have this in my database table
image_id | identifier | filename | mime_type | file_size | file_data | thumbnail_data
Identifier is used to classify the images when they get uploaded.
Let's say I have this:
1 | newyork | ny1 | ... 2 | newyork | ny3 | ... 3 | newyork | ny2 | ... 1 | taiwan | tw1 | ...
the images will be displayed as:
New York:
ny1.jpg ny3.jpg ny2.jpg
Taiwan:
tw.jpg