Results 1 to 19 of 19

Thread: How do I go BMP --> JPG In VB Code Only?

  1. #1

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327

    Question How do I go BMP --> JPG In VB Code Only?

    Well?
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Originally posted by Q_Me
    How do I go BMP --> JPG In VB Code Only?
    Well?
    Well What?

    What does "go BMP" mean?

    A little less "cute" and a little more "detail" would help.

  3. #3
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    It's pretty obvious what he asked for...

    He wants to convert BMP pictures to JPEG pictures...

    The anser is (from what I know), NO... VB saves only in BMP format...
    The only way I know to do it, is if you find a DLL that you include in your program that does it for you...

    But if you find a way... please let me know... i'm interested in something like that also...

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I think you want to look for the Intel JPEG library.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    Member
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    37
    ....which unfortunately has been stuffed together into IPP by Intel. You can still find IJL 1.1 on vbAccelerator.
    Sunny

    * No trees were harmed in the making or sending of this message. However a great number of electrons were terribly inconvenienced.

  6. #6
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Originally posted by Hack
    Well What?

    What does "go BMP" mean?

    A little less "cute" and a little more "detail" would help.
    What are you smoking?

    I want some.

  7. #7
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    So?
    Emiliano F. Martín


    If a post has helped you then please Rate 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.

  8. #8

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    Convert BMP to JPG using VB code is what i'm asking for.
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  9. #9
    Member
    Join Date
    Sep 2002
    Location
    Sydney, Australia
    Posts
    37
    And the answer we gave is, "No". Its not possible in plain VB code.

    You can get the JPEG standards and try and code it yourself, but if that was even remotely possible in VB it would've already been done, and there would be no need for all these 3rd party DLLs to be written.
    Sunny

    * No trees were harmed in the making or sending of this message. However a great number of electrons were terribly inconvenienced.

  10. #10
    Hyperactive Member CHAMPGARY's Avatar
    Join Date
    Jul 2002
    Posts
    386
    Hi,

    I think u didn't search on the forum about this. There are some threads available on this subject ,
    Please first go through those ,
    To help you I have some useful threads

    1) http://www.vbaccelerator.com/codelib/gfx/vbjpeg.htm
    2) http://www.vbforums.com/showthread.p...ht=BMP+TO+JPEG

    Cheers

    Gary

  11. #11
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    http://haztek.no-ip.com/files/bmp2jpg.zip has a dll file and a project you can use to learn how to do it. I don't know if it's the Intel jpeg file, but it's what I use for JPEGs.
    <removed by admin>

  12. #12
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    I don't think it is impossible in VB without using an external dll, but it is an enormous amount of work. You would have to dig deep into the JPEG file format. And when you finally succeed, you have to pay intel for using the JPEG format in your program. They copyrighted it.

  13. #13
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    www.wotsit.org

    They document the jpeg compression.

    Have fun.


  14. #14
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Yes, that is a great site for file formats. The document on the JPEG file format I found was 186 pages.
    I also found the source code (c++) for a dll (cxImage) that is capable to convert to JPEG.
    The JPEG part of it is 59 files with source code.

    Like I said, it is an enormous amount of work.

  15. #15
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    In VB:

    Shell Execute MSPaint
    Send Keys Alt F Open
    Send Keys "Your file.BMP"
    Send Keys Alt F SaveAs
    Send Keys "Your file.JPG"
    Send Keys Alt F X

  16. #16
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    I don't think he wants to use MSPaint. He doesn't even want to use an external dll.

  17. #17
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Actually, quite technically, you can write a conversion app in VB...

    but heres the problem, you have to learn both the binary
    patterns of the BMP format and the JPG format...and just directly
    convert the binary...now, the question is how BAD do you want
    the conversion?
    Luke

  18. #18

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    The bmp2jpg.dll works fine for me, thanx MidgetsBro
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  19. #19
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456
    OR YOU CAN USE KODAK IMAGE EDIT CONTROL WHICH COMES WITH VB6.

    Option Explicit

    Private Sub Form_Click()
    With ImgEdit1
    .SaveAs "c:\t.jpg", 3, , , , False
    End With
    End Sub

    Private Sub Form_Load()
    With ImgEdit1
    .Image = "C:\WINNT\ferrari.bmp"
    .Display
    .Refresh
    End With
    End Sub

    PASTE THIS CODE ON YOUR FORM. IN FORM LOAD SPECIFY A VALID BMP IMAGE IN THE .IMAGE PROPERTY. AND WHEN YOU CLICK ON THE FORM IT WILL SAVE IT AS T.JPG ON YOUR C DRIVE.

    AT LEAST YOU WILL NOT BE DEPENDENT ON A DLL FOR WHICH YOU DO NOT HAVE THE SOURCE CODE. AND IF SOMETHING GOES WRONG, THERE IS HARDLY ANYTHING YOU CAN DO !!!!!


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