I know how to retrieve the mime-type, the picture type, the description and the picture data. But how can i paint the picture ? I tried to save the data to a file, but it doesn't work...
Thanks in advance for any help.
Last edited by matt3011; Sep 21st, 2002 at 12:56 AM.
Originally posted by IROY55 To paint a picture use PaintPicture method.
I don't think that would be of much help... since the information he has might not be compatible with PaintPicture.
Paste all the info in a file and try to rename it to .jpg, or .gif (I guess that would be the target types) and see if any Image Viewer can open it. That could give us a clue about the type of the fiel we're dealing with.
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Originally posted by IROY55 He asked a specific question: how to paint a puicture? I gave him an answer. So I am not sure why would you say that it "wouldn't be of much help... "
Simple:
PaintPicture Method
Draws the contents of a graphics file (.bmp, .wmf, .emf, .cur, .ico, or .dib) on a Form, PictureBox, or Printer. Doesn't supportnamed arguments.
I guess MP3 files would save the image in a compress format like JPG or even GIF. None of those extension would be suitable for PaintPicture. You might need to convert them before trying to use it.
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Originally posted by matt3011 I know how to retrieve the mime-type, the picture type....
Ok, it seems you already have this, so... what's the type of the picture?
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Windows media player save it as image/bmp.
When i open the picture with psp7, i only have (bottom) part of the image. Don't know why. I make a link for my .bas
sYear As String * 4 ' and they use the 2 remaining bytes for "TrackNumber"!
Comments As String * 30
Genre As Byte
End Type
The remark about the comments is wrong. You need 28 bytes for the comments, a Chr(0) and a byte to set the track number (so you can set the track number up to 255)
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Ok, I can see in the GetID3 function that you have this code:
VB Code:
Open "dessin.bmp" For Binary As #2
Put #2, , picture_data
Close #2
Can you post a zipped copy of this file so that I can see it?
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
The file doesn't exists originaly. It's the file i extract from the tag. I can't post the file i exctracted from my mp3, it's too large 140ko compressed
I know that the file was extracted from it. I wanted to see if I can open it. Can you upload it to any server?
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
McBrain,
I think you are missing something: by using PaintPicture you may practically load any type of image as long as Picturebox supportes it. Try this:
Picture1.AutoRedraw = True
Picture1.PaintPicture LoadPicture("c:\somefile.jpg"), 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
Winrar might compressed to better. Or you can also split the file into two files.
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Originally posted by IROY55 McBrain,
I think you are missing something: by using PaintPicture you may practically load any type of image as long as Picturebox supportes it. Try this:
Picture1.AutoRedraw = True
Picture1.PaintPicture LoadPicture("c:\somefile.jpg"), 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight
I haven't tried it. I thought what the MSDN should be true.
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
If that's the file you get you can try with Iroy's code. Actually you don't even need the PaintPicture:
VB Code:
Option Explicit
Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Picture = LoadPicture("C:\dessin.bmp")
End Sub
Emiliano F. Martín
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
Actually, i found that the error isn't from painting picture but, i don't retieve enough data with my function.
I tried to modify the frame size manually and i can extract the entire file and paint it.
I don't know why the frame size calculated doesn't correspond to the actual size of the frame.
If a post has helped you then pleaseRate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.