Camera RAW Files

Mac OSX specific forum
gekkonier
User
User
Posts: 78
Joined: Mon Apr 23, 2007 9:42 am

Camera RAW Files

Post by gekkonier »

I would like to code a "simple" image manipulation program, and would like to benefit from the raw reader that is included with the operating system.
Can anyone point me into the right direction as I couldn't find any usable information in the german and english purebasic forum?

I believe there is an api for it, but where could I start?

Thank you very much, Gekko
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Camera RAW Files

Post by wilbert »

It depends on what you want to use; carbon or cocoa.

When using carbon, you probably need something like CGImageSource
https://developer.apple.com/library/mac ... rence.html

When using cocoa, you can use the NSImage class.
https://developer.apple.com/library/mac ... rence.html

If it will work or not also depends on the file types the OS supports.

On my computer ( OS X 10.8 ) when using cocoa, the list of supported types is

'PDF ',PDF,pdf,'PICT',PIC,pic,PCT,pct,PICT,pict,'EPSF',PS,ps,EPSI,epsi,EPSF,epsf,EPI,epi,EPS,eps,'BMPf',
'PNTG','.SGI','TPIC','BMP','8BPS','icns','TIFF','jp2','GIFf','PNGf','JPEG',MPO,mpo,HDR,hdr,EXR,exr,MAC,mac,
PNT,pnt,PNTG,pntg,RGB,rgb,SGI,sgi,TARGA,targa,TGA,tga,CUR,cur,XBM,xbm,BMP,bmp,ICO,ico,PSD,psd,
ORF,orf,MRW,mrw,RWL,rwl,RW2,rw2,RAW,raw,RAF,raf,CRW,crw,ICNS,icns,EFX,efx,JFAX,jfax,JFX,jfx,G3,g3,
FAX,fax,TIFF,tiff,DCR,dcr,ERF,erf,ARW,arw,SR2,sr2,SRF,srf,SRW,srw,PEF,pef,NRW,nrw,NEF,nef,3FR,3fr,FFF,fff,
MOS,mos,CR2,cr2,DNG,dng,TIF,tif,JPF,jpf,JP2,jp2,GIF,gif,PNG,png,JPS,jps,JFIF,jfif,JPE,jpe,JPEG,jpeg,JPG,jpg


If the type you need is in this list, it will probably work.
gekkonier
User
User
Posts: 78
Joined: Mon Apr 23, 2007 9:42 am

Re: Camera RAW Files

Post by gekkonier »

Thank you very much, that was the right direction.

I will use the NSImage class which is included in the cocoa api.
Thank you.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: Camera RAW Files

Post by fsw »

One thing to keep in mind:

raw != raw

or in other words:

raw <> raw

BTW: It would be nice to know if the cocoa version of PB uses this or still the same library that is used on all operating systems.

I am to provide the public with beneficial shocks.
Alfred Hitshock
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Camera RAW Files

Post by DarkDragon »

For canon raw there is an official sdk (EDSDK) and the so called libraw.
bye,
Daniel
Post Reply