Re: Creating a Bundle via Code

2008-06-21 Thread Ben Trumbull
Grant, You don't need a bundle or package or anything besides a plain old directory. Core Data doesn't care where you place your images on the file system. One file URL is just as good as any other to Core Data. As others have mentioned, it's probably the transition from JPEG->NSImage->NSD

Re: Creating a Bundle via Code

2008-06-20 Thread Jens Alfke
On 20 Jun '08, at 4:00 PM, Grant Limberg wrote: Currently, the user drags an existing image from their filesystem to an NSImageView bound to an NSData attribute in the sqlite data store. This causes the decompression from 1.5MB to 20MB. That's an issue with NSImageView — when an image is

Re: Creating a Bundle via Code

2008-06-20 Thread j o a r
On Jun 20, 2008, at 4:00 PM, Grant Limberg wrote: Currently, the user drags an existing image from their filesystem to an NSImageView bound to an NSData attribute in the sqlite data store. This causes the decompression from 1.5MB to 20MB. As you can see, this isn't exactly efficient. H

Re: Creating a Bundle via Code

2008-06-20 Thread Grant Limberg
Currently, the user drags an existing image from their filesystem to an NSImageView bound to an NSData attribute in the sqlite data store. This causes the decompression from 1.5MB to 20MB. As you can see, this isn't exactly efficient. Hence the question on package/bundle creation. I'm

Re: Creating a Bundle via Code

2008-06-20 Thread j o a r
On Jun 20, 2008, at 3:43 PM, Grant Limberg wrote: As far as I know, you can't store a raw jpeg in Core Data directly without turning it into an NSData object first which in turn decompresses it. It sounds quite possible that Core Data only support images in the form of NSData. That said

Re: Creating a Bundle via Code

2008-06-20 Thread Grant Limberg
As far as I know, you can't store a raw jpeg in Core Data directly without turning it into an NSData object first which in turn decompresses it. Someone correct me if I'm wrong! Grant Limberg [EMAIL PROTECTED] LinkedIn: http://www.linkedin.com/in/grantlimberg http://www.glsoftware.net On Ju

Re: Creating a Bundle via Code

2008-06-20 Thread Jerry Krinock
On 2008 Jun, 20, at 15:28, Grant Limberg wrote: Initially I was storing the data in Core Data. In my app, the user has the ability to attach an image to a record in Core Data. Unfortunately, changing from a JPEG to NSData inflates a 1.5MB JPEG to over 20 MB. I was planning on doing some

Re: Creating a Bundle via Code

2008-06-20 Thread j o a r
On Jun 20, 2008, at 3:28 PM, Grant Limberg wrote: Initially I was storing the data in Core Data. In my app, the user has the ability to attach an image to a record in Core Data. Unfortunately, changing from a JPEG to NSData inflates a 1.5MB JPEG to over 20 MB. In talking with some folks

Re: Creating a Bundle via Code

2008-06-20 Thread Grant Limberg
Initially I was storing the data in Core Data. In my app, the user has the ability to attach an image to a record in Core Data. Unfortunately, changing from a JPEG to NSData inflates a 1.5MB JPEG to over 20 MB. In talking with some folks at the local Cocoaheads meeting on wednesday, one

Re: Creating a Bundle via Code

2008-06-20 Thread Matt Long
This might help: http://www.cimgf.com/2008/05/13/from-hacker-to-microisv-custom-file-formats/ In essence you create a folder and set attributes on it as you suspected. Though these are referred to as packages instead of bundles. Take a look at NSFileManager. You can create a directory that

Re: Creating a Bundle via Code

2008-06-20 Thread Ken Thomases
On Jun 20, 2008, at 4:43 PM, Grant Limberg wrote: Is there a way to create a new bundle from in Cocoa? What I'd like to do is have a bundle in my app's Application Support folder to store some data generated by the user in my app. Since it's just data, I think you want a package rather than

Creating a Bundle via Code

2008-06-20 Thread Grant Limberg
Is there a way to create a new bundle from in Cocoa? What I'd like to do is have a bundle in my app's Application Support folder to store some data generated by the user in my app. I see plenty of methods to call to load bundles and check if a folder is a bundle, but not creating them. D