Image Wells, Core Data, and Sqlite files.
Posted
by Sway
on Stack Overflow
See other posts from Stack Overflow
or by Sway
Published on 2009-10-07T03:41:26Z
Indexed on
2010/03/26
21:13 UTC
Read the original article
Hit count: 410
I've got a mac application that I've developed.
I use it to create sqlite files that are bundled with my iphone app. The mac app uses Core Data and bindings and is working fine except for one "weird" issue.
I use an NSImageView (or Image Well) to allow me to drag and drop jpg files.
This is bound through to an optional binary attribute in my model class.
For some reason when I drag and drop a 4k jpg file it onto the image well and save the sqlite file. The data saved to the binary column is over 15 times larger than it should be.
Whereas if I use an application like SQLiteManager and add the image into the row in the database. The binary data is the correct (expected size).
File 4k jpg Actual size: 2371. Persisted via Core Data size: 35810.
Can anyone give me a suggestion as to why this might be happening?
Do I need to set some setting in Interface Builder or write some custom code?
© Stack Overflow or respective owner