Save image in Oracle database

I have a table in database where I am saving some images like blob datatype. I want to resize some of that images and then save the new images in the table . How I can do that without saving first the new image to the disk (locally) and then inserting in the table.
Can somebody help me with a suggestion ?

Hi Oana,

Thank you for your interest in Aspose APIs.

I am afraid, Aspose.Imaging for Java API does not provide any means to directly read Blob data type. Although if you can write your own custom routines to read the database field and convert it to a stream object, you can pass this stream to Image.load method for further processing. Once you have updated the image as per your requirement, you can store the results in a stream and write it to Blob field.

Sample code snippet to re-size the image is as follow,

Java


//Load an image
Image image = Image.load(new FileInputStream(myDir + “input.png”));
//Resize the image providing the new dimensions
image.resize(100, 100);
//Save the image
image.save();