Get Image attributes from BLOB

Q: How can I obtain image attributes such as height, width, format from BLOB column?
A: Using Oracle Multimedia ORDImage object type it is possible to get such attributes.

Consider the following example:
DECLARE
  lv_blob                  BLOB;
  unused_attributes        CLOB;
  img_mimetype             VARCHAR2(32);
  img_width                INTEGER;
  img_height               INTEGER;
  img_contentlength        INTEGER;
  unused_fileformat        VARCHAR2(32);
  unused_contentformat     VARCHAR2(32);
  unused_compressionformat VARCHAR2(32);
BEGIN
  SELECT blob_content
  INTO lv_blob
  FROM mytable;
  ordsys.ordimage.getproperties(lv_blob,
                                unused_attributes,
                                img_mimetype,
                                img_width,
                                img_height,
                                unused_fileformat,
                                unused_compressionformat,
                                unused_contentformat,
                                img_contentlength);
  dbms_output.put_line('Width=' || img_width || ' Height=' || img_height);
END;

You may encounter exceptions while calling this procedure if the image format is not proper. So always wrap this procedure call within an EXCEPTION block and determine the error.

For a list of exceptions which you can handle, check out the documentation.

Learning Git

Now-a-days if you search for any source code, this word is always there. "GIT". What is so special about it?

Well check out the Wikipedia page to know about its history. I would like to borrow one sentence from Wikipedia though:
Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005
The light bulbs glowed for the first time. I always fancied Linux and its kernel development, though I knew nothing about it. But this was the first time something near to the Linux kernel was available to me, and which could help me manage my source code. Although the learning was mandated for official reasons, I now fancy Git in "all and everything" which I code.

Having said that what is the starting point? I implemented Git in my local development first. My aim was to have Git take backup of everything in my development folder. The starting point was this Git book.

I summarize the tasks I was upto:

  1. Create a fresh project folder
  2. Copy all my required and necessary folders and files
  3. Back them up to a shared folder (server)
  4. Work independently of my local machine

Save with PacktPub


Packt Publishing is celebrating 10 years of its presence by a unique promotional way. 

To celebrate this huge milestone, from June 26th Packt is offering all of its eBooks and Videos at just $10 each for 10 days – this promotion covers every title and customers can stock up on as many copies as they like until July 5th. #Packt10Dollar

Hurry up, and buy your stocks before the offer ends, click here: http://bit.ly/1rhKWwS