Xojo Conferences
XDCMay2019MiamiUSA

[MBS] asBLob.CopyBinaryData returns black square in web edition (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 15.0pr6
Next thread: [MBS] ODBC Function Sequence Error


Re: [MBS] IconImageMBS slow 10.9   -   Garth Hjelte
  [MBS] asBLob.CopyBinaryData returns black square in web edition   -   Anthony Dellos
   Re: [MBS] asBLob.CopyBinaryData returns black square in web edition   -   Anthony Dellos
   Re: [MBS] asBLob.CopyBinaryData returns black square in web edition   -   Christian Schmitz

[MBS] asBLob.CopyBinaryData returns black square in web edition
Date: 06.01.15 16:41 (Tue, 6 Jan 2015 07:41:45 -0800)
From: Anthony Dellos
The following code:

* dim cmd as SQLCommandMBS*
* cmd = new SQLCommandMBS*
* cmd.Connection = con*

* dim sql as string*
* sql = "SELECT GetAs(energy_supervisor_signature,'PNGf') as es_signature
FROM assessments " _*
* + "WHERE server_id = 14442 "*

* // select images using sql above*
* cmd.setCommandText(sql)*
* cmd.Execute*
* dim i as Integer = -1*

* while cmd.FetchNext*

* dim mb as MemoryBlock cmd.Field("es_signature").asBLob.CopyBinaryData*
* if mb.Size > 0 then*
* dim p as Picture = Picture.FromData(mb)*
* self.es_signature = p*
* end if*

* wend*

* Return True*

returns a transparent png when ran in a desktop project, but a black square
when ran in a web project.

This is Xojo version 2014r3.1 using MBS Xojo SQL Plugin version 14.0
(18163)
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] asBLob.CopyBinaryData returns black square in web edition
Date: 07.01.15 22:57 (Wed, 7 Jan 2015 13:57:26 -0800)
From: Anthony Dellos
Christian,

Yes. Data is there. I can see it. I may end up using your PNG plugin. I do
think this might be a xojo issue, but found it worth sharing here.

FYI - same issue using Xojo’s ODBC plugin. (indicating issue is not plugin,
but png issue in web edition projects)

Anthony

On Tue, Jan 6, 2015 at 1:51 PM, Christian Schmitz <
<email address removed>> wrote:

>
> >
> > returns a transparent png when ran in a desktop project, but a black
> square
> > when ran in a web project.
> >
> what happens if you write this data to a file?
> Is the PNG inside?
>
> Not that Picture.FromData fails for you.
>
> In my test with 14.0 the plugin works just fine. Just the Picture.FromData
> in console does not read mask here. But I think this is known bug and you
> can use our PNG plugin.
>
> Greetings
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
>
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] asBLob.CopyBinaryData returns black square in web edition
Date: 06.01.15 22:51 (Tue, 6 Jan 2015 22:51:53 +0100)
From: Christian Schmitz

>
> returns a transparent png when ran in a desktop project, but a black square
> when ran in a web project.
>

what happens if you write this data to a file?
Is the PNG inside?

Not that Picture.FromData fails for you.

In my test with 14.0 the plugin works just fine. Just the Picture.FromData in console does not read mask here. But I think this is known bug and you can use our PNG plugin.

Greetings
Christian