Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, July 19, 2018 4:01:24 AM(UTC)


Groups: Registered
Posts: 7

Thanks: 2 times


I want to access each pixel data in 1bpp image.
File Attachment(s):
bit1_ccitt.tiff (168kb) downloaded 248 time(s).

But LBitmapBase.GetPixelData is only for 8, 16, 24, 32, 48 and 64-bit bitmaps.

Is there way for access 1bpp image?


Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, July 19, 2018 7:01:34 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)


The main reason the LBitmapBase::GetPixelData method only works on 8/16/24/32/48/64 BPP images is because they are multiples of 8. This means the actual data stored in a pixel is represented by an integer number of bytes. For images with different BPP, such as your image with 1 BPP, you'll need to use either the GetRow method or the GetRowColumn method. Both of the documentation pages below have an example for usage:

LBitmapBase::GetRow: https://www.leadtools.com/help/leadtools/v20/main/clib/lbitmapbase-getrow.html
LBitmapBase::GetRowCol: https://www.leadtools.com/help/leadtools/v20/main/clib/lbitmapbase-getrowcol.html

Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

thanks 1 user thanked Anthony Northrup for this useful post.
krekar on 7/20/2018(UTC)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.089 seconds.