4 Replies Latest reply: Mar 31, 2010 4:15 AM by 759167 RSS

    Upload image to blob and resize to 3 different sizes

    732941
      Hi all,
      I currently have a form where people can upload an image to a blob via a form (Oracle Portal, version 9). The table has the following fields (amongst others)

      IMG_BLOB
      IMG_MIME
      IMG_ALT

      I plan to change this so that when the user uploads a photo, the following happens:

      1) Original photo is resized to 400 pixels wide, with the ratio kept the same to determine the height
      2) A new copy made at 200 pixels wide, with the ratio kept the same to determine the height. Stored in a 2nd blob.
      3) A new copy made at 32x32 pixels (thumbnail), cropped so that image subject is still clear. Stored in a 3rd blob.

      I will probably update by database fields to:

      IMG_LARGE
      IMG_SMALL
      IMG_THUMB
      IMG_MIME
      IMG_ALT

      Reading these forums it looks like I need to be using process() and processCopy()
      http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14297/ch_imgref.htm#BABHACJI

      There sre some pl/sql examples given, but I'm struggling as I'm a beginner.
      Would someone be able to help me with the code?

      Also, do we need additional software to use process/processCopy, or is it integrated already?