Results 1 to 8 of 8

Thread: Saving Pictures to JPG Files from VB **RESOLVED**

  1. #1

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625

    Saving Pictures to JPG Files from VB **RESOLVED**

    There was a dll and a sample project of this at the vbaccelerator website but now the site is gone!!!!

    Does anybody know where i can get those samples??


    Fomr this site:
    http://www.vbaccelerator.com/codelib/gfx/vbjpeg.htm
    Download the SaveJPEG Project (including ijl11.dll) (150kb)


    Please help,
    this is urgent!!

    Thanks,
    MoMad
    Last edited by MoMad; Aug 14th, 2002 at 06:18 PM.
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Go to intel's site and search for their DLL. Then, you'll just have to figure it out yourself, I'm afraid. Or, use google's cached version.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    I did man, but the link to the actual code is broken!!!!!!! Their whole website is been shut down for a while now. I wonder what happened to them?
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  4. #4

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    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...
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  5. #5
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    Heres some code to save as a JPG I found a while ago:
    Attached Files Attached Files
    Involved in: Sentience

  6. #6

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    Thanks man,

    you just saved me a whole load of work. I was about to write a JPEG compress/decompress dll in VC++. If your file works out, then i wont need to.

    Thanks,
    MoMad
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  7. #7

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    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:
    1. Dim JPeg() As Byte
    2. ReDim JPeg(UBound(BMP)) As Byte
    3.  
    4. 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,
    MoMad
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

  8. #8

    Thread Starter
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    I did it, and here's the code:

    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:
    1. Public Function SaveToJPegPtr(DestJPegPtr() As Byte, _
    2.                               SrcBitmapData() As Byte, _
    3.                               ByVal Width As Long, _
    4.                               ByVal Height As Long, _
    5.                               Optional ByVal Quality As Long = 75) As Long
    6.  
    7. ' DestJPegPtr -- buffer to store the jpeg data (Dim JPegBuffer() As Byte)
    8. ' SrcBitmapData -- buffer that holds bitmap data (from GetDIBits)
    9. ' Width -- width of the bitmap
    10. ' Height -- height of the bitmap
    11. ' Quality -- quality of the JPEG (75 is default)
    Attached Files Attached Files
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width