Hi, You can declare cmsDoTransorm as follows: Public Declare Sub cmsDoTransform Lib "lcms.dll" _ (ByVal hTransform As Long, _ ByVal InputBufferPtr As Long, _ ByVal OutputBufferPtr As Long, _ ByVal BufferSize As Long) As Long
BufferSize is the number of pixels. As Marti wrote in tutorial, windows aligne scanline on double word boundary, so pay attention. To transform an image: Dim row as long,buf() as byte,bufptr as long redim buf(wbytesperscanline-1) bufptr=varptr(buf(0)) for row=0 to Imageheight-1 GetImageScanLine ' Imagerow ==> buf() cmsDoTransform hTransform, Byval bufPtr, _ Byval bufPtr, _ ImageWidth PutImageScanLine ' Buf ==> Imagerow On Fri, 26 Jan 2007 13:39:46 -0300 "leonardo maggini" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to use Little cms with VB6, but when I >call > cmsDoTransform function my application crashes. > > I don't know much of API declarations so I think that >may be there is > a problem there... > I don't have any problem calling other functions like > cmsOpenProfileFromFile, or cmsCreateTransform, but >cmsDeleteTransform > and cmsDoTransform always crashes the application. > > So I ask for help to someone who knows how to use lcms >with VB6 and > could point me in the right direction... > > Thanks to all in advance. > -- > Leonardo Maggini > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the >chance to share your > opinions on IT & business topics through brief surveys - >and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Lcms-user mailing list > Lcms-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/lcms-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user