Consider the code:
Dim oProps(0) As New com.sun.star.beans.PropertyValue
oProps(0).Name = "URL"
oProps(0).Value = "https://bug-attachments.documentfoundation.org/attachment.cgi?id=177261"
oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
oGraphic = oProvider.queryGraphic(oProps())
It uses attachment 177261 [details] (that is simply a small PNG having 24 BPP), and the expected output would be 24; but the actual result is "True".
The problem is implementation of BitsPerPixel property (documented to have 'byte' UNO type)  in vcl/source/graphic/UnoGraphicDescriptor.cxx, where the UNO type is defined as cppu::UnoType< sal_uInt8 > . But that type maps to TypeClass::BOOLEAN , which makes Basic to convert the non-0 value to True.
The actual type that maps to TypeClass::BYTE is cppu::UnoType< sal_Int8 >.
The problem was since the introduction of the code in commit 7e83653a7fac894bee2c7c35fa2b84daac026642; there also was GraphicType property using that type initially, but that was fixed in commit 0170d51253bddd1e8ec1c8c887b526f2fc18d019. The code that sets the numeric value to the property  uses the correct sal_Int8 type.
The fix of this easyhack should contain a unit test.