Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12451

bBrowser Image

From Franz Rachbauer <office@rachbauer.org>
Newsgroups comp.lang.clipper.visual-objects
Subject bBrowser Image
Date 2019-04-26 11:45 +0200
Organization Aioe.org NNTP Server
Message-ID <q9ujvf$qsd$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Hi guys,
how can I read a JPG and convert it to a bBrowser bitmap?

oColumn := bDataColumn{SELF:oDCBrowser, odbsServer, {|Server, Owner| 
Owner:GetImage(Server)}, #Expression, SELF}

METHOD GetImage(oServer) CLASS ...
LOCAL cFile AS STRING
LOCAL ptrFile AS PTR
LOCAL oImage AS bBitmap

cFile := oServer:Fieldget(#PICNAME)
ptrFile := DIBCreateFromFile(String2Psz(cFile)
FabWriteDIB2BMPFile(ptrFile, "C:\TMP\TEST.BMP")	// 14 bytes, not ok

// Version 1
oImage := bBitmap{ptrFile}
// Version 2
oImage := bBitmap{FabDIBToBitmap(ptrFile, NULL_PTR)}
RETURN oImage

Neither version 1 nor 2 creates a bitmap that is shown in bDataColumn. 
What goes wrong?
Franz

Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

bBrowser Image Franz Rachbauer <office@rachbauer.org> - 2019-04-26 11:45 +0200
  Re: bBrowser Image D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2019-04-27 18:21 +0200
    Re: bBrowser Image Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2019-04-27 20:12 +0200
      Re: bBrowser Image Franz Rachbauer <office@rachbauer.org> - 2019-04-28 08:46 +0200
        Re: bBrowser Image Franz Rachbauer <office@rachbauer.org> - 2019-04-28 09:43 +0200

csiph-web