The JPEG DLL is no longer being offered by Intell, but i was able to do a search for it on google and i found it!
But now i will need help putting the pieces together... I need to take a bitmap (a byte array of the actual bitmap in memory), and convert it into a jpeg (an actual byte array of the jpeg in memory). I just want to work with memory pointers.
That VBAccelerator code was perfecrt, but I wonder what happened to them? hmmmmmm...
Actually, I was looking for code to put the jpeg data into a byte array. I have the bitmap data stored into a byte array already but its too big, the same picture could be much smaller if it was a jpeg.
To make a long store short, I just need the entire jpeg file stored into a byte array like:
VB Code:
Dim JPeg() As Byte
ReDim JPeg(UBound(BMP)) As Byte
SaveToPtr ByVal VarPtr (Jpeg), ByVal VarPtr (BMP)
Or something like that, i know i have seen it on the vbaccelarator website and downloaded it, but i cant find it anywhere on my hard drive. Any help appreciated.
Thanks for the zip file man, i would've typed everything up and spent loads of time figuring out how vb translates vc objects and viseversa. Anyways, the sample worked greatly except i realized the bitmap has to be 24bit for the JPeg thing to work, and some other weird things had to be done.
Here's the function:
VB Code:
Public Function SaveToJPegPtr(DestJPegPtr() As Byte, _
SrcBitmapData() As Byte, _
ByVal Width As Long, _
ByVal Height As Long, _
Optional ByVal Quality As Long = 75) As Long
' DestJPegPtr -- buffer to store the jpeg data (Dim JPegBuffer() As Byte)
' SrcBitmapData -- buffer that holds bitmap data (from GetDIBits)