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

Notification

Icon
Error

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

krekar  
krekar

Groups: Registered
Posts: 7

Thanks: 2 times

Hi.

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


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

Is there way for access 1bpp image?

Thanks.
 

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:06:34 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

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

Hello,

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

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
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-2019, Yet Another Forum.NET
This page was generated in 0.104 seconds.