Page 1 of 1

Missing images in xBrowse

PostPosted: Thu Nov 07, 2019 3:07 pm
by ukoenig
Hello,

I want to list all created bmp's from a defined directory
I noticed all normal Bmp's are visible but not the created ones.
The images are OK because they are visible at the bottom on
xBrowse row-selection

Image

saved like

oBmp1:SaveToBmp( c_path2 + "Img64_" + ALLTRIM(STR(nCount[1])) + ".bmp" )

in xBrowse

WITH OBJECT:aCols[ 1 ]
:cDataType := 'F'
:nDataBmpAlign := AL_CENTER
:lBmpTransparent := .f.
//:lBmpTransparent := .t.
END

some of the created Bmp's

Image

Image

Image

Image

any idea

regards
Uwe :?:

Re: Missing images in xBrowse

PostPosted: Thu Nov 07, 2019 8:26 pm
by cmsoft
Maybe if you increase the row height of the xbrowse?

Re: Missing images in xBrowse

PostPosted: Thu Nov 07, 2019 9:01 pm
by ukoenig
The row-height is defined with 65 pixel
to show a image with the max size of 64x64.
It is funny that only the saved images are not visible.
I can copy any other image to the directory
like shown in the screenshot from above and it works.

I think I will create a working test to show the effect

regards
Uwe :(

Re: Missing images in xBrowse

PostPosted: Fri Nov 08, 2019 6:55 am
by nageswaragunupudi
We do not know your xbrowse code.
We also do not know if the bitmaps created are valid bitmaps.
We can advise if you provide a self contained sample program.

Re: Missing images in xBrowse

PostPosted: Fri Nov 08, 2019 8:53 am
by ukoenig
I think I found what happens :(

We also do not know if the bitmaps created are valid bitmaps.

1. I did a screenshot

ACTIVATE WINDOW oWnd ;
ON RIGHT CLICK oWnd:SaveToBmp( "test.bmp" )


2. using < PIXELFORMER > the problem is visible.
The filemanager is showing the normal bmp. :!:
Loading the file I'm getting a funny result, everything is transparent.
We do not know your xbrowse code.

That is the reason xBrowse doesn't show the created bmp

Image

The same happens using another freeware < xNView >
Again a different result.
Now the filemanager and editor are showing < Test.bmp > as a transparent image

Image

Image

maybe another solution instead of using :SaveToBmp ?
I tested :
hBmp := FW_MakeYourBitmap( 64, 64, { |hDC,w,h| GradientFill( hDC, 0, 0, h, w, ;
{{ 1, aColors[2] , aColors[4] }} ) } )
FW_SaveImage( hBmp, AllTrim( c_path2 + "Img64_" + ALLTRIM(STR(nCount[1])) + ".bmp" ) )

but the same result created but not visible in xBrowse :(

3. using a professional program < COREL Paintshop Pro >.
The filemanager and editor are showing the normal bmp. :!:
There must be something wrong with the file-format

the created oWnd:SaveToBmp( "test.bmp" )

Image

another test
loaded and saved again with a new name without any changes
now it works

Image

regards
Uwe :?:

Re: Missing images in xBrowse

PostPosted: Thu Nov 14, 2019 9:23 am
by ukoenig
I changed to xImage and added a export-format-option.
A created JPG is ok, a BMP is not visible

Image

Image

is there any solution for BMP's

regards
Uwe :?:

Re: Missing images in xBrowse

PostPosted: Thu Nov 14, 2019 9:34 am
by nageswaragunupudi
You may get this problem in case of bitmaps with only 2 colors.

Please try
oCol:lBmpTransparent := .F.

Re: Missing images in xBrowse

PostPosted: Thu Nov 14, 2019 9:44 am
by ukoenig
You may get this problem in case of bitmaps with only 2 colors.


I tested with a screenshot ( many colors ) and got the same result
it seems to be somethig wrong with the BMP-format

The BMP is created but not visible in xbrowse

Image

regards
Uwe :?:

Re: Missing images in xBrowse

PostPosted: Thu Nov 14, 2019 9:46 am
by nageswaragunupudi
Can you send me the bitmaps to my email?

Re: Missing images in xBrowse

PostPosted: Thu Nov 14, 2019 3:30 pm
by ukoenig
to create Your own images for testing
The latest release

Download

http://www.pflegeplus.com/DOWNLOADS/GrdPaint3.zip

created as JPG and saved again as BMP works
BMP, PNG and JPG are defined ( PNG works )

Image

regards
Uwe :D

Re: Missing images in xBrowse

PostPosted: Fri Nov 15, 2019 9:00 am
by ukoenig
I found a working solution for the moment

If BMP-format is selected I create a working PNG
next I load the PNG and save as BMP
next I delete the PNG

Code: Select all  Expand view

IF cType = ".bmp"
     cCounter := ALLTRIM(STR(nCount[1]))
     cFile := c_path2 + "Img64_" + cCounter + ".png"
     oBmp[5]:Save( .T., cFile )
     FW_SaveImage( FW_ReadImage( nil, cFile )[ 1 ], ;
           c_path2 + "Img64_" + cCounter + cType )
     DELETE FILE &cFile
ELSE
     oBmp[5]:Save( .T., c_path2 + "Img64_" + cCounter + cType, 100 )
ENDIF
 


Image

regards
Uwe :D

Re: Missing images in xBrowse

PostPosted: Fri Nov 15, 2019 9:32 am
by nageswaragunupudi
ukoenig wrote:I found a working solution for the moment

If BMP-format is selected I create a working PNG
next I load the PNG and save as BMP
next I delete the PNG

Code: Select all  Expand view

IF cType = ".bmp"
     cCounter := ALLTRIM(STR(nCount[1]))
     cFile := c_path2 + "Img64_" + cCounter + ".png"
     oBmp[5]:Save( .T., cFile )
     FW_SaveImage( FW_ReadImage( nil, cFile )[ 1 ], ;
           c_path2 + "Img64_" + cCounter + cType )
     DELETE FILE &cFile
ELSE
     oBmp[5]:Save( .T., c_path2 + "Img64_" + cCounter + cType, 100 )
ENDIF
 


Image

regards
Uwe :D


I still can not believe that xbrowse can not display a valid bmp and you have to find workarounds.

Can I see the bitmap that xbrowse can not display? If that is the case we will find a solution.

Re: Missing images in xBrowse

PostPosted: Fri Nov 15, 2019 4:00 pm
by ukoenig
with the new release I'm working on
I can change the XImage background-brush

I changed the brush and saved the image < as viewed >
I got a new image with a < blustone.bmp > - background
the brush AND image is saved correct like the filemanager shows
xBrowse shows only the image and ignores the background
maybe the tests can help to detect if there is something wrong
it seems the background is detected as transparent but it is a pattern brush

Image

Loading the image in PIXELFORMER shows the background from
< blustone.bmp > transparent as well like xBrowse with a missing background :roll:
I think the problem doesn't belong to xBrowse

Image

the test bbb.bmp
It looks like there is a border around that makes it transparent :?:
I added -> oImage:lBmpTransparent := .F.
but no difference

Image

Funny and hard to understand as a test I reloaded this posted image and it works

Image

regards
Uwe :D