⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sjpg.cls

📁 bmp格式转化为jpg格式的算法
💻 CLS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -