|
|
Title | Verify that JPG files are smaller and slower than BMP files |
Keywords | JPG, BMP, JPEG, GIF, bitmap, image, size, speed |
Categories | Graphics, Controls |
|
|
Images are stored in a form or PictureBox's Picture property in the form from which they were loaded. They are converted into bitmaps when they are displayed at run time.
To save space, load the pictures from compressed JPEG or GIF files. This will save space in the form's FRX file and in the compiled executable.
This also makes the program take longer to convert the image into a bitmap for display at runtime. To save display time, load pictures from BMP files.
|
|
Private Sub cmdBMP_Click()
Dim start_time As Single
start_time = Timer
FormBMP.Show
MsgBox Format$(Timer - start_time, "0.00") & " seconds"
End Sub
Private Sub cmdJPEG_Click()
Dim start_time As Single
start_time = Timer
FormJPEG.Show
MsgBox Format$(Timer - start_time, "0.00") & " seconds"
End Sub
|
|
|
|
|
|