Linux Lazarus比特像素错误

Linux Lazarus比特像素错误,linux,lazarus,Linux,Lazarus,有一个简单的应用程序是用Lazarus编写的。当它试图打开图形文件时,会出现“不兼容BitsPerPixel”错误。操作系统:Debian。拉扎勒斯:1.4.0。有没有办法解决这个问题 ERROR in LCL: TGtk2WidgetSet.CreateBitmapFromRawImage Incompatible BitsPerPixel Creating gdb catchable error: $000000000050B225 line 720 of lazloggerbase.pa

有一个简单的应用程序是用Lazarus编写的。当它试图打开图形文件时,会出现“不兼容BitsPerPixel”错误。操作系统:Debian。拉扎勒斯:1.4.0。有没有办法解决这个问题

ERROR in LCL: TGtk2WidgetSet.CreateBitmapFromRawImage Incompatible BitsPerPixel

Creating gdb catchable error:
$000000000050B225 line 720 of lazloggerbase.pas
$00000000004BCBDE line 1414 of lclproc.pas
$00000000004BAB0B line 859 of lclproc.pas
$00000000005E38A6 line 417 of gtk2lclintf.inc
$0000000000568A45 line 152 of include/lclintf.inc
$00000000004DB208 line 3622 of intfgraphics.pas
$000000000054A7BA line 554 of include/rasterimage.inc
$000000000045FDC3 line 86 of unit1.pas
$0000000000460258 line 144 of unit1.pas
TApplication.HandleException Failed to create handles
Stack trace:
$00000000004DB22E line 3623 of intfgraphics.pas
$000000000054A7BA line 554 of include/rasterimage.inc
$000000000045FDC3 line 86 of unit1.pas
$0000000000460258 line 144 of unit1.pas
$00000000006346A8 line 2724 of include/control.inc
$00000000006636E6 line 54 of include/buttoncontrol.inc
$0000000000663FD6 line 169 of include/buttons.inc
$00000000006635E9 line 20 of include/buttoncontrol.inc
$000000000042E411
$00000000006241C1 line 5341 of include/wincontrol.inc
$000000000070B585 line 112 of lclmessageglue.pas
$000000000071ADB2 line 2423 of gtk2wsstdctrls.pp
代码:

xwininfo结果:

xwininfo: Window id: 0x1a0002d "RGB<->XYZ<->Lab"
Absolute upper-left X:  642
Absolute upper-left Y:  37
Relative upper-left X:  2
Relative upper-left Y:  0
Width: 636
Height: 1041
Depth: 24
Visual: 0x20
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x22 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners:  +642+37  -642+37  -642-2  +642-2 
-geometry 636x1041+640-0
xwininfo:windowid:0x1a0002d“RGBXYZLab”
绝对左上角X:642
绝对左上角Y:37
相对左上角X:2
相对左上角Y:0
宽度:636
身高:1041
深度:24
视觉:0x20
视觉类别:TrueColor
边框宽度:0
类别:输入输出
颜色映射:0x22(已安装)
钻头重力状态:西北重力
窗口重力状态:西北重力
备份存储状态:不可用
保存状态:否
地图状态:可见
覆盖重定向状态:否
转角:+642+37-642+37-642-2+642-2
-几何图形636x1041+640-0

考虑到24位窗口深度,不确定原因,但切换到Init_BPP32_B8G8R8A8_M1_BIO_TTB();修复了问题。

考虑到24位窗口深度,不确定原因,但切换到Init_BPP32_B8G8R8A8_M1_BIO_TTB();解决了这个问题

xwininfo: Window id: 0x1a0002d "RGB<->XYZ<->Lab"
Absolute upper-left X:  642
Absolute upper-left Y:  37
Relative upper-left X:  2
Relative upper-left Y:  0
Width: 636
Height: 1041
Depth: 24
Visual: 0x20
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x22 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners:  +642+37  -642+37  -642-2  +642-2 
-geometry 636x1041+640-0