title: NSData UIImageJPEGRepresentation not writing to SQLite fmdb
body: <p>I am attempting to convert a jpeg to an nsdata object and then store that data in a blob column of an sqlite database using the fmdb wrapper.</p>
  
  <p>e.g:</p>
  
  <pre><code>UIImage *img = [UIImage imageNamed:@"house.jpeg" ];
  NSData *data = UIImageJPEGRepresentation(img, 1.0);
  NSString *query = [NSString stringWithFormat:@"insert into t1 values (null,?)", data ];
  </code></pre>
  
  <p>Where t1 is created something like:</p>
  
  <pre><code>[database executeUpdate:@"create table t1(rowid integer primary key autoincrement, house blob)" ];
  </code></pre>
  
  <p>Ideally I would then be able to pull the data out and convert it back to a jpeg like so:</p>
  
  <pre><code>NSString *query = @"select * from t1";
  
  FMResultSet *results = [database executeQuery:query];
  
  while ([ results next ]) 
  {
  
      NSData *picData = [ results dataForColumn:@"house" ];
      UIImage *housePhoto = [ UIImage imageWithData:picData ];
  }
  </code></pre>
  
  <p>I have used this type of model for other data types like strings, etc.. with no problem. In my current attempt I am using this model with a table of string columns and 1 blob column. When I write to the database, all of the strings are stored fine, but when I try to read back the blob column like above, I get null returned for the blob column. Prior to writing to the database I double checked to see that the NSData I am writing with was not null and did contain a jpeg representation and it did. Does a known issue jump out at anyone or am I just doing something wrong externally from this?</p>