sjpg.cls

来自「bmp格式转化为jpg格式的算法」· CLS 代码 · 共 57 行

CLS
57
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "sjpg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Dim s As New aDIBSection
Private sfilename As String
Private squal As Integer




Public Property Get savefilenamej() As String
Attribute savefilenamej.VB_Description = "Name of the file to save to"

End Property

Public Property Let savefilenamej(ByVal vNewValue As String)
sfilename = vNewValue
If Len(Dir(sfilename)) <> 0 Then
 Kill sfilename
End If
End Property

Public Property Get savepicj() As Long
Attribute savepicj.VB_Description = "The picture box picture.handle"

End Property

Public Property Let savepicj(ByVal vNewValue As Long)
Dim d As Integer
'Set d = vNewValue
' d = CallByName(vNewValue, "width", VbGet)
s.CreateFromPicture vNewValue

SaveJPG s, sfilename, squal
End Property


Public Property Get savequal() As Integer
Attribute savequal.VB_Description = "Quality of the saved jpeg. 99 the highest, 10 the lowest. 90 is normal"

End Property

Public Property Let savequal(ByVal vNewValue As Integer)
squal = vNewValue
End Property

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?