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


Groups > comp.databases.ms-access > #8987 > unrolled thread

A 2010 Picture directly from string

Started byJürgen Meyer <juergen.ul.meyer@gmx.de>
First post2014-02-10 16:05 +0100
Last post2014-02-17 20:38 -0500
Articles 7 — 3 participants

Back to article view | Back to comp.databases.ms-access


Contents

  A 2010 Picture directly from string Jürgen Meyer <juergen.ul.meyer@gmx.de> - 2014-02-10 16:05 +0100
    Re: A 2010 Picture directly from string "Access Developer" <accdevel@gmail.com> - 2014-02-10 12:55 -0600
      Re: A 2010 Picture directly from string Jürgen Meyer <juergen.ul.meyer@gmx.de> - 2014-02-14 10:59 +0100
        Re: A 2010 Picture directly from string "Access Developer" <accdevel@gmail.com> - 2014-02-14 10:31 -0600
    Re: A 2010 Picture directly from string Norman Peelman <npeelman@cfl.rr.com> - 2014-02-16 12:09 -0500
      Re: A 2010 Picture directly from string Jürgen Meyer <juergen.ul.meyer@gmx.de> - 2014-02-17 15:35 +0100
        Re: A 2010 Picture directly from string Norman Peelman <npeelman@cfl.rr.com> - 2014-02-17 20:38 -0500

#8987 — A 2010 Picture directly from string

FromJürgen Meyer <juergen.ul.meyer@gmx.de>
Date2014-02-10 16:05 +0100
SubjectA 2010 Picture directly from string
Message-ID<feqhf91keicplbpcgmu59cir9kak2tm2d0@4ax.com>
I have extracted a picture from a MP3 file using Audiogenie and putting the
data into a string.
Is it possible to use the string for displaying the picture directly in a
PictureBox control of a form?
Me!MyPicture = ???

I know that there is another way, e.g. storing the picture as tmp.jpg on the
HD and then to display it on the form. But that's not what I want to do.

Regards
Juergen

[toc] | [next] | [standalone]


#8989

From"Access Developer" <accdevel@gmail.com>
Date2014-02-10 12:55 -0600
Message-ID<blsllnFsnp6U1@mid.individual.net>
In reply to#8987
Not sure how you "store a picture as a string".

In "classic Access, as far as I know the Access Image Control only displays 
"standard graphics file formats", of which JPEG/JPG is one, windows bitmap 
.BMP is another. If you use Unbound or Bound OLE Frame Controls, you can use 
OLE objects containing any graphics file format that the OLE-compatible 
graphics software installed on the computer supports.

I have some old examples posted at http://accdevel.tripod.com.

Recent versions of Access have additional image / graphics features.

-- 
Larry Linson
  Microsoft Office Access MVP
  Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

"Jürgen Meyer" <juergen.ul.meyer@gmx.de> wrote in message 
news:feqhf91keicplbpcgmu59cir9kak2tm2d0@4ax.com...
>I have extracted a picture from a MP3 file using Audiogenie and putting the
> data into a string.
> Is it possible to use the string for displaying the picture directly in a
> PictureBox control of a form?
> Me!MyPicture = ???
>
> I know that there is another way, e.g. storing the picture as tmp.jpg on 
> the
> HD and then to display it on the form. But that's not what I want to do.
>
> Regards
> Juergen 

[toc] | [prev] | [next] | [standalone]


#9015

FromJürgen Meyer <juergen.ul.meyer@gmx.de>
Date2014-02-14 10:59 +0100
Message-ID<qlprf9hul6btscql65qu37eg4a0je2gt20@4ax.com>
In reply to#8989
On Mon, 10 Feb 2014 12:55:52 -0600, "Access Developer" <accdevel@gmail.com>
wrote:

>Not sure how you "store a picture as a string".
>
>In "classic Access, as far as I know the Access Image Control only displays 
>"standard graphics file formats", of which JPEG/JPG is one, windows bitmap 
>.BMP is another. If you use Unbound or Bound OLE Frame Controls, you can use 
>OLE objects containing any graphics file format that the OLE-compatible 
>graphics software installed on the computer supports.
>
>I have some old examples posted at http://accdevel.tripod.com.
>
>Recent versions of Access have additional image / graphics features.

Tnx for the answer
I am doing the following:
strPicture = Audiogenie. ID3V2GetPictureArray(1)

So I get a binary string and the question is how to display the content
directly.

Only a few people know that a MP3 can contain more than 1 picture although the
most programs like WinAmp only show the first one.
Therefore the index

Also thanks for the sample database. But if I understand it correctly, it will
only work, if one saves the extracted picture to the HD beforehand.
And that is exactly that what I do not want to do as it would make the program
slow(er), I guess.

Juergen

[toc] | [prev] | [next] | [standalone]


#9016

From"Access Developer" <accdevel@gmail.com>
Date2014-02-14 10:31 -0600
Message-ID<bm6un9F40qjU1@mid.individual.net>
In reply to#9015
Yes, it works with pictures in graphics files.

Audiogenie is, I guess, software with which I am not familiar.

I don't know of any way to display a picture read in as a string directly 
from any Access control, and I'm not aware of any custom controls that would 
handle it  (but the world is full of custom controls, so that doesn't mean 
there isn't such a control available).

With today's faster processors, faster (and more) memory, and faster disk 
drives, the time to store to disk may not be intolerable.

-- 
Larry Linson
  Microsoft Office Access MVP
  Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

"Jürgen Meyer" <juergen.ul.meyer@gmx.de> wrote in message 
news:qlprf9hul6btscql65qu37eg4a0je2gt20@4ax.com...
> On Mon, 10 Feb 2014 12:55:52 -0600, "Access Developer" 
> <accdevel@gmail.com>
> wrote:
>
>>Not sure how you "store a picture as a string".
>>
>>In "classic Access, as far as I know the Access Image Control only 
>>displays
>>"standard graphics file formats", of which JPEG/JPG is one, windows bitmap
>>.BMP is another. If you use Unbound or Bound OLE Frame Controls, you can 
>>use
>>OLE objects containing any graphics file format that the OLE-compatible
>>graphics software installed on the computer supports.
>>
>>I have some old examples posted at http://accdevel.tripod.com.
>>
>>Recent versions of Access have additional image / graphics features.
>
> Tnx for the answer
> I am doing the following:
> strPicture = Audiogenie. ID3V2GetPictureArray(1)
>
> So I get a binary string and the question is how to display the content
> directly.
>
> Only a few people know that a MP3 can contain more than 1 picture although 
> the
> most programs like WinAmp only show the first one.
> Therefore the index
>
> Also thanks for the sample database. But if I understand it correctly, it 
> will
> only work, if one saves the extracted picture to the HD beforehand.
> And that is exactly that what I do not want to do as it would make the 
> program
> slow(er), I guess.
>
> Juergen 

[toc] | [prev] | [next] | [standalone]


#9024

FromNorman Peelman <npeelman@cfl.rr.com>
Date2014-02-16 12:09 -0500
Message-ID<ldqrcc$nbr$1@dont-email.me>
In reply to#8987
On 02/10/2014 10:05 AM, Jürgen Meyer wrote:
> I have extracted a picture from a MP3 file using Audiogenie and putting the
> data into a string.
> Is it possible to use the string for displaying the picture directly in a
> PictureBox control of a form?
> Me!MyPicture = ???
>

If the data in the string is still in binary form you could try:

Me!MyPicture = <string variable>

> I know that there is another way, e.g. storing the picture as tmp.jpg on the
> HD and then to display it on the form. But that's not what I want to do.
>

   It never is... :)

> Regards
> Juergen
>

Take a look:

http://support.microsoft.com/kb/317701
http://support.microsoft.com/kb/321900
http://stackoverflow.com/questions/9576868/how-to-put-image-in-a-picture-box-from-a-byte-in-c-sharp
http://stackoverflow.com/questions/743549/how-to-put-image-in-a-picture-box-from-bitmap
http://stackoverflow.com/questions/8084590/how-to-load-image-from-sql-server-into-picture-box

vba:
http://www.vbforums.com/showthread.php?569672-Convert-String-To-and-From-Binary
http://www.vbforums.com/showthread.php?541643-RESOLVED-Convert-string-to-image&p=3347303#post3347303


   Many responses revolve around memorystream. You may find something 
that works.

[toc] | [prev] | [next] | [standalone]


#9028

FromJürgen Meyer <juergen.ul.meyer@gmx.de>
Date2014-02-17 15:35 +0100
Message-ID<l774g9p7m6gqah7tt5r1svrbjt6u35clv8@4ax.com>
In reply to#9024
On Sun, 16 Feb 2014 12:09:31 -0500, Norman Peelman <npeelman@cfl.rr.com>
wrote:

>On 02/10/2014 10:05 AM, Jürgen Meyer wrote:
>> I have extracted a picture from a MP3 file using Audiogenie and putting the
>> data into a string.
>> Is it possible to use the string for displaying the picture directly in a
>> PictureBox control of a form?
>> Me!MyPicture = ???
>>
>
>If the data in the string is still in binary form you could try:
>
>Me!MyPicture = <string variable>
>

Hi,
that was the first thing I tried.
But I now found the solution.

The correct line must be:
Me!MyPicture.PictureData = Mystring
Instead of
Me!MyPicture.picture = Mystring

Works like a charm.

Tnx to all for your assistance
Juergen

[toc] | [prev] | [next] | [standalone]


#9029

FromNorman Peelman <npeelman@cfl.rr.com>
Date2014-02-17 20:38 -0500
Message-ID<ldudih$j65$1@dont-email.me>
In reply to#9028
On 02/17/2014 09:35 AM, Jürgen Meyer wrote:
> On Sun, 16 Feb 2014 12:09:31 -0500, Norman Peelman <npeelman@cfl.rr.com>
> wrote:
>
>> On 02/10/2014 10:05 AM, Jürgen Meyer wrote:
>>> I have extracted a picture from a MP3 file using Audiogenie and putting the
>>> data into a string.
>>> Is it possible to use the string for displaying the picture directly in a
>>> PictureBox control of a form?
>>> Me!MyPicture = ???
>>>
>>
>> If the data in the string is still in binary form you could try:
>>
>> Me!MyPicture = <string variable>
>>
>
> Hi,
> that was the first thing I tried.
> But I now found the solution.
>
> The correct line must be:
> Me!MyPicture.PictureData = Mystring
> Instead of
> Me!MyPicture.picture = Mystring
>
> Works like a charm.
>
> Tnx to all for your assistance
> Juergen
>

   Thanks for posting the SOLVE!


-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

[toc] | [prev] | [standalone]


Back to top | Article view | comp.databases.ms-access


csiph-web