Can you show us how you did it? I have the same problem. On Monday, January 7, 2013 11:47:49 PM UTC-5, newbie wrote: > > Hi, > > I have created the Pix using pixCreate,pixSetData, pixEndianByteSwap. > However, when I call pixDestroy, it crashed. Do you know what I am doing > wrong? Is there any restriction for pixCreate? Noted that Only the pix was > created by pixCreate crashed. > > Please advise. > Thanks. > > On Thursday, January 3, 2013 3:22:07 PM UTC+7, newbie wrote: >> >> Thanks for your reply. I will try those APIs. >> Saving image into disk and reading back is not preferred since it will >> affect the performance. I would like to process it in memory rather than >> read from IO. >> Thanks. >> >> On Wednesday, January 2, 2013 5:11:53 PM UTC+7, TP wrote: >>> >>> On Wed, Jan 2, 2013 at 1:37 AM, TP <[email protected]> wrote: >>> > On Wed, Jan 2, 2013 at 12:15 AM, newbie <[email protected]> wrote: >>> >> Hello experts, >>> >> >>> >> I would like to create a Pix of Leptonica from my HBITMAP which was >>> captured >>> >> from the screen shot.Could you please advise me how to create it? >>> > >>> > See pixGetWindowsHBITMAP() in leptonica/src/leptwin.c [1] >>> > >>> > [1] http://tpgit.github.com/Leptonica/leptwin_8c_source.html#l00276 >>> >>> Oops. I just re-read your message and you want to go from HBITMAP to >>> Pix, not the other way around. I never got around to writing that >>> routine, but using the various static "helper" functions in leptwin.c >>> and pixCreate() [1], pixSetData() [2], and possibly pixSetColorMap() >>> [3] and pixEndianByteSwap() [4] this should be reasonably "simple" --- >>> assuming you are familiar with the internal structure of hbitmaps. >>> Reading dibsectn.c [5], which the guts of leptwin.c was based on, may >>> or may not help. >>> >>> Otherwise your easiest course is to just write the HBITMAP to disk as >>> TIFF or PNG and then read it back in. >>> >>> [1] http://tpgit.github.com/Leptonica/pix1_8c_source.html#l00269 >>> >>> [2] http://tpgit.github.com/Leptonica/pix1_8c_source.html#l01376 >>> >>> [3] http://tpgit.github.com/Leptonica/pix1_8c_source.html#l01312 >>> >>> [4] http://tpgit.github.com/Leptonica/pix2_8c_source.html#l02283 >>> >>> [5] http://shito.servebeer.com/pub/study/win32app/_tips/_DIBSectn.c >>> >>
-- -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

