Missing images in xBrowse

Missing images in xBrowse

Postby ukoenig » Thu Nov 07, 2019 3:07 pm

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 :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby cmsoft » Thu Nov 07, 2019 8:26 pm

Maybe if you increase the row height of the xbrowse?
User avatar
cmsoft
 
Posts: 1291
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Missing images in xBrowse

Postby ukoenig » Thu Nov 07, 2019 9:01 pm

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 :(
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby nageswaragunupudi » Fri Nov 08, 2019 6:55 am

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Missing images in xBrowse

Postby ukoenig » Fri Nov 08, 2019 8:53 am

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 :?:
Last edited by ukoenig on Thu Nov 14, 2019 9:24 am, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby ukoenig » Thu Nov 14, 2019 9:23 am

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 :?:
Last edited by ukoenig on Thu Nov 14, 2019 9:54 am, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby nageswaragunupudi » Thu Nov 14, 2019 9:34 am

You may get this problem in case of bitmaps with only 2 colors.

Please try
oCol:lBmpTransparent := .F.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Missing images in xBrowse

Postby ukoenig » Thu Nov 14, 2019 9:44 am

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 :?:
Last edited by ukoenig on Thu Nov 14, 2019 3:55 pm, edited 4 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby nageswaragunupudi » Thu Nov 14, 2019 9:46 am

Can you send me the bitmaps to my email?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Missing images in xBrowse

Postby ukoenig » Thu Nov 14, 2019 3:30 pm

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
Last edited by ukoenig on Fri Nov 15, 2019 9:13 am, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby ukoenig » Fri Nov 15, 2019 9:00 am

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  RUN

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
Last edited by ukoenig on Fri Nov 15, 2019 3:59 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Missing images in xBrowse

Postby nageswaragunupudi » Fri Nov 15, 2019 9:32 am

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  RUN

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Missing images in xBrowse

Postby ukoenig » Fri Nov 15, 2019 4:00 pm

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
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests