DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.76k stars 389 forks source link

How do I convert a Qimage to s pix #588

Closed jkoking closed 3 years ago

jkoking commented 3 years ago

Sorry if there is a obvious solution I can't figure it out

DanBloomberg commented 3 years ago

You need to find the definition of the QImage class. The pix is defined in pix.h. Conversion is typically non-trivial, because you need to take into consideration: whether the representation is packed if there is padding on each rasterline (e.g., pix are padded to 32-bit words) byte order of pixels (eg., little-endian or big-endian) sample order of RGB and A for color images colormap conversion if Qimage can use colormaps

zdenop commented 3 years ago

What about to try search internet before posting questios? E.g. https://www.google.com/search?q=qimage+to+leptonica+pix&oq=qimage+to+leptonica+pix&aqs=chrome..69i57j69i60l2j69i61.6828j0j1&sourceid=chrome&ie=UTF-8 -> first found linki is https://stackoverflow.com/questions/8655772/convert-leptonica-pix-object-to-qpixmap-or-other-image-object Your problem was solved 10 year ago.

jkoking commented 3 years ago

What about to try search internet before posting questios? E.g. https://www.google.com/search?q=qimage+to+leptonica+pix&oq=qimage+to+leptonica+pix&aqs=chrome..69i57j69i60l2j69i61.6828j0j1&sourceid=chrome&ie=UTF-8 -> first found linki is https://stackoverflow.com/questions/8655772/convert-leptonica-pix-object-to-qpixmap-or-other-image-object Your problem was solved 10 year ago.

You're right I should not have posted this issue I do not know what I was thinking I'm sorry