Page 1 of 1
Camera RAW Files
Posted: Mon Sep 24, 2012 8:59 am
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
Re: Camera RAW Files
Posted: Mon Sep 24, 2012 9:51 am
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.
Re: Camera RAW Files
Posted: Mon Sep 24, 2012 10:01 am
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.
Re: Camera RAW Files
Posted: Wed Sep 26, 2012 5:23 pm
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.
Re: Camera RAW Files
Posted: Wed Sep 26, 2012 6:17 pm
by DarkDragon
For canon raw there is an official sdk (EDSDK) and the so called libraw.