Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Resize an image held in a BLOB

John_KFeb 7 2018 — edited Feb 8 2018

I have a table which will hold images in a BLOB file. These will always be jpg. However as the user can upload these, I would like to resize them to a specified size (i.e. maximum of 800 width/height, whilst maintaining aspect ratio). I am able to upload to a temporary table first (which will be the case actually because they'll be uploaded through APEX). however has anyone any experience of doing this? I found this old post [https://spendolini.blogspot.de/2005/10/manipulating-images-with-database.html ] however the link doesn't seem to work any more, and also it's very old so may no longer be valid anymore.

This isn't specifially an APEX question - I'm just (planning on) using APEX to get the images in the database in the first place. For arguments sake, assume they're loaded in by any method.

I was trying to think how I might be able to push out to a commandline tool like ImageMagick but not sure how I'd be able to do that within the database for a blob.

[edit] - I should point out that the reason for the resize isn't for display purposes, it's to compress it to minimise storage overhead - I don't want thousands of 10mb images being uploaded and I also don't want to he users to have to manually resize before uploading (takes too lng and is a step backwards from their current process).

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2018
Added on Feb 7 2018
6 comments
3,934 views