Use a script that clean a combined vector and image drawing imported from PDF's.
It's not possible to avoid that some layers and areas appear as black images.
Have used MRI to try to spot any differences, and almost all images to keep appear to use UINameSingular = 'Bitmap with transparency' and the rest use 'Bitmap'.
A few of those set to 'Bitmap' aren't black and should therefore be kept.
How can one sample and spot if an image is only black in OpenOffice basic?
[Solved] Determine if an image show up as black
[Solved] Determine if an image show up as black
Last edited by Hagar Delest on Wed Oct 30, 2019 1:10 pm, edited 1 time in total.
Reason: tagged solved
Reason: tagged solved
Apache OpenOffice 4.1.13 on ArcaOS 5.0.7
Re: Determine if an image show up as black
Previous reports on forum show some methods of encoding jpg files cause them to render as black when inserted into OpenOffice documents. I do not remember for certain if any solution was found for this - I think not, as the encodings were nothing to do with OpenOffice. From memory this was something to do with colorspaces used RGB/CMYK.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Re: Determine if an image show up as black
If you post a document showing the problem (in both your current threads) it might give people a better chance of helping you.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Determine if an image show up as black
And the solution took me all day, but here it is!
Code: Select all
...
ElseIf drawobject.ShapeType = "com.sun.star.drawing.GraphicObjectShape" Then
'This part is also a problem as Bitmap images appear in black while "Transparent Bitmap" appear as they should except one Transparent Bitmap that show up as "Bitmap", strange.
If drawobject.FillColor = RGB( 207, 231, 245 ) And drawobject.UINameSingular = "Bitmap" Then
Dim bmp() As Byte
bmp = drawobject.GraphicObjectFillBitmap.getDIB()
If 0 = bmp( LBound( bmp ) + 1078 ) Then
oDrawPage.remove( drawObject )
EndIf
EndIf
EndIf
Apache OpenOffice 4.1.13 on ArcaOS 5.0.7