Well?
Printable View
Well?
Well What?Quote:
Originally posted by Q_Me
How do I go BMP --> JPG In VB Code Only?
Well?
What does "go BMP" mean? :confused:
A little less "cute" and a little more "detail" would help.
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...
I think you want to look for the Intel JPEG library.
:)
....which unfortunately has been stuffed together into IPP by Intel. You can still find IJL 1.1 on vbAccelerator.
What are you smoking?Quote:
Originally posted by Hack
Well What?
What does "go BMP" mean? :confused:
A little less "cute" and a little more "detail" would help.
I want some. :D
So?
Convert BMP to JPG using VB code is what i'm asking for.
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.
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
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.
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.
www.wotsit.org
They document the jpeg compression.
Have fun.
:p
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.
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
I don't think he wants to use MSPaint. He doesn't even want to use an external dll.
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?
The bmp2jpg.dll works fine for me, thanx MidgetsBro :)
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 !!!!!
http://www.vbforums.com/