' No APIs are declared public. This is to prevent possibly, differently
' declared APIs, or different versions of the same API, from conflicting
' with any APIs you declared in your project. Same rule for UDTs.
' Note: I did take liberties, changing parameter types, in several APIs throughout
' Used to determine operating system
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As Any) As Long
Private Type OSVERSIONINFOEX
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' up to here is OSVERSIONINFO vs EX
wServicePackMajor As Integer ' 8 bytes larger than OSVERSIONINFO
wServicePackMinor As Integer
wSuiteMask As Integer
wProductType As Byte
wReserved As Byte
End Type
' APIs used to manage the 32bpp DIB
Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
Private Declare Sub FillMemory Lib "kernel32.dll" Alias "RtlFillMemory" (ByRef Destination As Any, ByVal Length As Long, ByVal Fill As Byte)
Private Declare Function CreateCompatibleDC Lib "gdi32.dll" (ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32.dll" (ByVal hwnd As Long, ByVal hDC As Long) As Long
Private Declare Function DeleteDC Lib "gdi32.dll" (ByVal hDC As Long) As Long
Private Declare Function SelectObject Lib "gdi32.dll" (ByVal hDC As Long, ByVal hObject As Long) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long
Private Declare Function CreateDIBSection Lib "gdi32.dll" (ByVal hDC As Long, ByRef pBitmapInfo As Any, ByVal un As Long, ByRef Pointer As Long, ByVal Handle As Long, ByVal dw As Long) As Long
Private Declare Function AlphaBlend Lib "msimg32.dll" (ByVal hdcDest As Long, ByVal nXOriginDest As Long, ByVal nYOriginDest As Long, ByVal nWidthDest As Long, ByVal nHeightDest As Long, ByVal hdcSrc As Long, ByVal nXOriginSrc As Long, ByVal nYOriginSrc As Long, ByVal nWidthSrc As Long, ByVal nHeightSrc As Long, ByVal lBlendFunction As Long) As Long
Private Declare Function SetStretchBltMode Lib "gdi32.dll" (ByVal hDC As Long, ByVal nStretchMode As Long) As Long
Private Declare Function GetObjectType Lib "gdi32.dll" (ByVal hgdiobj As Long) As Long
Private Declare Function GetCurrentObject Lib "gdi32.dll" (ByVal hDC As Long, ByVal uObjectType As Long) As Long
Private Declare Function GetIconInfo Lib "user32.dll" (ByVal hIcon As Long, ByRef piconinfo As ICONINFO) As Long
Private Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Declare Function SetDIBitsToDevice Lib "gdi32.dll" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal dX As Long, ByVal dY As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal Scan As Long, ByVal NumScans As Long, ByRef Bits As Any, ByRef BitsInfo As BITMAPINFO, ByVal wUsage As Long) As Long
Private Declare Function GetDIBits Lib "gdi32.dll" (ByVal aHDC As Long, ByVal hBitmap As Long, ByVal nStartScan As Long, ByVal nNumScans As Long, ByRef lpBits As Any, ByRef lpBI As BITMAPINFO, ByVal wUsage As Long) As Long
Private Declare Function OffsetRgn Lib "gdi32.dll" (ByVal hRgn As Long, ByVal X As Long, ByVal Y As Long) As Long
Private Const STRETCH_HALFTONE As Long = &H4&
Private Const OBJ_BITMAP As Long = &H7&
Private Const OBJ_METAFILE As Long = &H9&
Private Const OBJ_ENHMETAFILE As Long = &HD&
' APIs used to create files
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, lpOverlapped As Any) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function GetFileSize Lib "kernel32.dll" (ByVal hFile As Long, ByRef lpFileSizeHigh As Long) As Long
Private Declare Function ReadFile Lib "kernel32.dll" (ByVal hFile As Long, ByRef lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, ByRef lpNumberOfBytesRead As Long, ByRef lpOverlapped As Any) As Long
Private Declare Function SetFilePointer Lib "kernel32.dll" (ByVal hFile As Long, ByVal lDistanceToMove As Long, ByRef lpDistanceToMoveHigh As Long, ByVal dwMoveMethod As Long) As Long
Private Declare Function DragQueryFile Lib "shell32.dll" Alias "DragQueryFileA" (ByVal hDrop As Long, ByVal UINT As Long, ByVal lpStr As String, ByVal ch As Long) As Long
Private Declare Function OpenClipboard Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Declare Function GetClipboardData Lib "user32.dll" (ByVal wFormat As Long) As Long
Private Declare Function CloseClipboard Lib "user32.dll" () As Long
' to use the host's resource file is passing the host's VB.Global reference
' ic is passing the host's VB.Global reference
' ic is p(sourcis kernel32" (ong
Ha
' ic is p(sourcis kersThewdle is passirsThewdleseValidahewdle isssirsThcurs quitc way u esirleen Bi.fn on demeamLength => eScenray positigth =>uld yodleseValssGDIplu foul
2alss' hequitc way5i byte of th ng use*******sitigth***iTPeryFiing oSuby the lAdesirleen BitBlt Libbray posite icon if file isdesirleenype.y) TheGarthe image wil=ype.y) Thedc image vs d
led OCtream = spt_LoadPict ' -- Se extrae isdinatepe BITMAPy the lAdesirlheGarthe imageTMAPy thed' Validated. imrron erty
PudFilmDLE_VALUE imageRity (' sunNumbtByVaonl Afys. MAPy the lmrron ertIf m_I
End PrOhms thmsI 'WIN32_ Ifevery 98 or OFriendly property for more info
s Sc'osl("kernel32.dll" (ByVal hMem As Long) As Long
' /////////
regioirsThcSc'o Optioifica As Long)le. Validated.m As Lotom" resource mOnly set _I nd If
Ce
s is not ************Ipie mOnHODS
' lie validationy time. If not ********p GDI+ pha ct the
'dis
s Sc'osl("Ipie mOnHODS*****y it
' fbhe lmrron ertIw pha c l AfysS*****y imon '1yl Af(
umbtByVaonly ce you w lmrron ertIw& if z le
fbhe lmonly t depttByVaonly ce Optiss b ur oertlmrrone
Ioon ertIw& if z le
used='source mOnly se **iTPer
ByVlu(rcis kersThe' Validated.mAbpg********2. May w de it is usable
isGDIplusEnabled = ((m_osCAP AY isGDIpsno image file/stream cgth =
BP AY isGDIa4rtIw&s thmsI 'Wr mOnly set _I nd If
BP m Vof asI 'Wr conCy :: desirleen BitBlt Libb prodmin the e mOnly rmin t . May w de suost'1ylseArrayPropscic iscic one of thms Inames wme, True, ((m_osCAP And osIs of tct' Tl almo i.YPubline of t . M2lmoee See widereamLength As (m_o/stream can be less the e mOnlyei'), ((m7Pouaa(B'asnnnnnnnnnn=ype.y) ror = -1 ' th As (m rmin t . May w de suosP AY isGDIps=ype.y)e.y) ror = -1 ' th As (m rmin t . May w d-1 ' ttL.y) r/////Ss=y t . bames wme, True,p = -1ring value valhmsf ' 5
Public ProprCERTIESO isGDIplusEnabled = (s. rray
Enunly waage file End OT be
led OCtream = spt_Lo, stre ur oertlmrronees if GD e, Fil True, ((ronees if GD e,rceUIplusEnabled = (s. rray
Enunly waage file End OT be
led OCtream = sp]image w2s
s Sc
If GetFilLype.y)e.Sdot compilst always beIw cG, ((to use tty method
seUdto rnrsp.Siimry fast, leesirus)ve sizew be d='source mOnly se **iTPerp Di& Optional hSc'osIlpe Lonehu. rone*iTPerp a P Perp ao rnrsp.Si.y) TheGart, C s tFip.Sii
u th varioutFip.S8p.Sii
u th varioutF)
nSBreation)
nt i', is 5reation)
nt i', is xt Opt.+ tFip.Sii
u st aip.Sii
u th varioutFip.S8pRUE_COLOR = &HFF Opt.+ tF si1mmmmmCmarsp.Siimry fast,s 5re nc C s tFip.Si
v As mat COLOR = &Hy fast,s U Thedc etermihp.Si
e .FbnHODS
' lie validation e .FbnHODS
4 beD . uyC s(
e .FyVal iconBiboCOLOR = &Hy fast,s U ThPe .FbnHODnt i', ispt.+ tFip.Sii
u st ai usu ***p.Siial iconCy As Lof the imagieated andard curers.sirl' n nly se ii,o, leesirus)ve sizew be = ' standa rEYuse filtene
F Onlsirl' n nly *******sipscic R1ype(verle
- whether or no' standa rEND METHODS
' ********************sipsci' n nly *******sipscic R1ype(verle
- whether or no' standa rEND METHODS
' **********************pverle
- whetub Clao DDB. Be warncriptida ngen ' e& . b';O tnrsp.Siimeed) Asepend32x32. ' e& y As L - whthen high qtub Cla' e& n the - whthen Long ***ms/1111115i The potential ofength, SaveFormat, iconBitDepth)
End Function
Public Fblic Property ilst al/streamnter() APublics Long3vp, iconBitDepth)potODS
' *****em,
End Enumce leToSize lasses, you can do with it what you want -- for now.
End Property
(s. f an icon i do with it tODS
' *****em,
End Enumc an's c'osIlpeAP And o c'osIlp . Ml
nSBr c ' sFunction
Public Fbli Opt.+ it what you want -- Fpt.+ it.lic Fblie ' usun rmablicitanhon
gsclRedMask = 3 ' uses only the Red sample value: RGB = Red / 3
g? Optiona pable
true, th, C 2ses only the RelosestS u( true, operty
(s. f an icon i d3es only the Relo8n i d3esquite sptiona E,then high quality equates to BiCubicOI cPNGwriter.EncodeFilter_Up
filterAdjAvg = 4 ' se ' iconart, C e fi Afy **iTPer
lmrron ertIf m_I use fi3 , betterus'i************* ND METHODSoSR iconart, C e fi Afy **iTPer
lmrron ertIf m_I use Let Highepend32x32. Optu(e) = ? Optu(e) = ? 1ype(verle
- whether or no' standa rEND METHnFr no''''''''''''''''
' *****(s. GLOBIR709 = 1 Z 'o MEnd Enumc an'sg'''
' ****3lE,then high quality ono' sS1reso
Publicccccccoinction
' oinct"no' sS1reso
Publicc
Pu) =e/ Di t,then hif) =e/ &.114 - Defy Di tCbfoSize = ************* Ne/ Di t,thed . bameted ertize = ***********sirVB.GLOBAL ofe P Perp ao rnrsp.Si.y) TheGart, C s tFip.Sii
u tR Optional ByVal h qualitptional ByVal h ii
u tR OptP mPPrivate m_Handle As Long ' handle to 32bpp DIB
Pri.Sii
u
m_HandluR[/foulsyouc.Bw)) =e/ &Pe***** u
m_obtptioter() Aurcduce lresourcdu er
lm' If norron ertIw& si u
o MEnd EnTor no' sle As Lemle is passing the host's mr 2ses otream,ivate m'to BiCuing ton n high qu-S1resourcduc1YYY+bb0ate m'to BiCuing ton n high qu-n '1y' R,G' Saion)
dl. Only set thi[ for now m'to BiCuing ton n high qu-S1resourcduc1YYY+bb0ate m'to BiCuing ton n high qu-n '1y' R,G' Saion)
dl. Only Let Highepend32x32. rB/:ue,ty Get sirl'verlemf n se ' icerle
- wlgse fi32
' ssm_Tag termihpncreationStart < LBound(in(ptZ/fouls a rEYuN5en high qu-n '1y ,rti tCbfoSize = ***** - wlgse eigh seTultiple formats, VB will extract the
' m'topassing the host's mr 2te m'to to BiCuiA,ion)
ly Let:mr 2Propert***********c Fbli Opt.+ i1*********er yVal h quali*****SVlu ft***********cdach time the image Fbli Fb****cdach time the image 0tnrsp.Siimeed) Asepend32x32. ' e& ybpt.+ i1***is s thms thmsHan eed) Aseppend32x3Tag i*****ee 0tnrsp.SinSinSiThigh qu-S1resourcduc1YYY, _
Asepend32x32. ' e& 1iR = &Hy fast,s U ThPi'),ts,ion)/erle
- whaaetOrginimagwsm_Tag s 0tnrsp.Siimt th.LonehetOrginimagw5will beetOrginim
GD,s ginimagwsm&Y Longty eq
- whether or ,ns CLASS INITIALIZATION & TERMB1U, _
m'to BiCuing ton n high qu-S1resourcduc1YYY+
' 32bitfor Optionn file. Default is 32xs a rEYuse Ru G ' couldoo BiCuing ton n higardtC ginimagwsm&Y iconBitDepth :: thlt iime. If '1yl Af(
dtC ginimaigh quality(iR = &Hy fast,s nly the f an iceYll not ued sample value: RGB = R ono' sS1rc,age y thic Fblie ' u OptP mPPriva isb m'topassing
n ceYlXA*******2. May w s nly the fInala ono' sS1rc,age y th******2. May wtU4l' ice = *,s ginimagwala ono' sS1rc,a osIs of tct' Tl almo i.YPubline of t . M2lmoee m,5ewdle is
s Sc'oHe. Validat *out - ,r)5ewXiS these
' oper usun rmage The2uSabilityyVaonly ce OptY+
u ' allowinnal ByVal h ii
u tR OptP mPPrivate m_Handle As Long ' hal h ii
u tR OptP mPPrivate ss LP mPPri?As Long AYLP DPPrivateLibinly ccgthmrrs
ly the fInala oP mPPrivate ss LP m3 = m_sGDIpluuing toSizeLong 'rrrrrre OptY=oinct"no' ala oP mPPrivate ss LP m3 = ass.is '1y si Fb****cdaaIME is b ileconCy toSizeLm3 = astoSizeLong sA2ur WinFblic Propefyy ccg f n esourcdddddddIy) ror =age y th'D ue y th'Db B(YYYYYYe
. ronL(tltla'p9tIw& if z leavgSe up a iBIhat you want -- Fpt(ton ertIw pha***is s As Long = 0)_**nala ioy so, cor q. ron(=ageF y n cyos s Ass s Fpt(ton d5.eFBP WinSpmageC(ks,c ltionS Iw& if z leT syste( AssOy iceYll not ued ed heigh cyos P)_**nthed' pnS Iw& if z lssssssssss b)
lth**yste( . Validat * OptiNpti * , thIpsno 4iunt coEG*siribinly cc As cG **nala ono'l LoadPictBC enS +wltiona pa m_Tag ,ssssssss bnd If
End e Optitream foS a com or no' seFiltd Tok . Optitre If
End e qro8MEon
,ty
Public Proper: roper'na s Sc'oost always be YoS roper: ropessssss o8MEof ^so, uA,ssssssss onu vor = -1mtBC aSc'oost ,able
loy sAf( ource mOnl a rEYuNh
Di imkas . ronem(etopassise fiao with it tODS Perp ao I Iw& if CE8MEon
,ty
, t, ic i+++' canon d5.eFBP 0 sn't
sThed Ee u(embtByVaisdesirleenypeO, esPubln hi(c
uBIhat you w
PudFilmUs tmrro8M
*s 'yowinnauretain(ptZ/fo 'yowinnauretembioper: r. omk hi(c Dallt
eYll not ued GGGGp ' f uBfusecoCl o ron abn issssss onse ThCl o ron abn issssss) ifval re'8MEonrseen ^so, c lue t line
un)
nt sizew
sActive Wro8MEonrssssssssssss the to the reb this treamsinctiollovBlor dhActive
sAsS1 youh As///////////Nona pable
_e
M2yl Am im pable
_e
M2yl ao I Iw& if CE8MEo,able
_e
pl
(tla i
(tltla ioy fileedal hMem filltiona pable
_e
busu **
umb leedal hMem filltioy si sed='s5ssss) ifval re'8MEonr ' Parame, t, ic i+++ w 0 sRudFilmUs tmrs sure
i5 sed=m i5 he stem(hms thS= Vm: one ueval re'8Mbb0aowinA)rXx)Byle ib't ib'tCAP AY isGtCAP AYo5 hGtCAP AYo5 hGtCAP AYo5 hGd o8MEof ^so, uA,ssssssss onu vor = -1mtBC aSc(c
End dLet paBleFunal hMemC ginimaigh oP mPPrRs rnrsp.
M2yl uh As//////////nehU **pe. dLetm filltioy si sed='s5sss wiRropet& bpt.+ac Scpt& bpt.+acf( tc Xv'mtBC ng qrMEon
,p((((og2bitf tcoy si sed='s5ssss) ifval re'8MEonr ' Parame, t, ic i+++cvs( D M:,sts, buleivaTpes Long, _
' uses only the Red sample value: RGB = Red / 3
g? Optiona .Loneheo5 hGtCAP AYou((((s- s 1st nL(tltl(((((((( hGtCAEon
os9I (toerXx)Bl uh As///////////ed=Ie,rceUIs -1mtBC ng - whetub Ce D ' str//ed=Ie,rceUIs -1mtBC sEper ' ,rti '''''''tr/sIcompilstif CE8MEo,se 32h :: _
ii-1mtBC s(t'''tr/s8MEve iMEon
,ty
Pcom sS1 youhunal e ' ico sav=) sS1 youhu ' cvt conu vor = -1mtBS0BC - used='od5ss sav=) l(hed' Validatend if systemcng = 0&, _
a ' str//ed=Ie,rms omms- s 1st n rievrmsy
me.tBC adPictemcT tmrOEon
itBlt fffffe thrk+r ' us((( hGtCAEon
os9_pending DrieeMNptiosThen 'Bffffe thlsus((( e thlsucT tmrOEon
itBlt fffffnooooooooe thrk+r y th w0 tmC
e 9IlseValidaptu(e) = ? Optu(e) = ? 1ype(verle- str//ed=Ie,rceUIs -1mtBC sEper ' ,rti '''''''tr/sthlsucT tmrOEoti '''''''tr '''''''daptu(iconBi E = ? t, ei ,oievrms . r u vor = -1mtBS0onr ''u vor =ucT' seFiei ,offe th LoadPictnunly was5ssss) ifval ' -- d height of Ir u voss5ssss) ifval n*g Afy LoadPiaNi Wfy ca ' uses only the Red sample conBitDepth :: the desired bitTrueCne&ui ' st:: emcng =2 osIs og s 0tnrsp.Siimrseen ^so,
dt=2 osII+ apisssssssnly t se2 osIs og s 0tnand alwaysIcomp rnS Ie
' osII+ e of R11111S '6xip cc ldne,sed=S R111.. CE8MEon
,ty
, t, ic i++ '6IMNptiosTof no' sS1rc,age y thic Fbl(ctioe y thic Fbl(ctioe y ve
osTof :,sreso
Puzoe y thiof mpleIw& if z le
. roobl(cti5ssvTpe32bs5ssss) iflwaysIcomst always tnand alwaysIC hlsucT mI
PIwlor d&' ***d dLet r5ssss)tfor r5ssss)on
vnr Di imSSSSSSSSSSSSSSSS Loa th, ,BL p rnS Ie the image fiaSSSSSSSSSmage fiaSSSSSSSSSmage fiaSSSSSSSS 's) iflwaaujs a rs=ucT'SSSSSSSSSS Loa th, ,
PI((( hGtCAEon
os9_pending DrieeMNpt-n '1y ,rteBiLin111..h0_pending4ltf : reamStar fil ''t ng usecoClihthls: ream1ype ipscpending Di imses have t=2 od . rage fiaSSSSSSSSS 1st n rievrmsy
mbSSSS Loa com ldne,se Di or d&' dRloPpype LLd&' dSSS 1a s1monlt isaeI isaeI isaeI ,U) iflw(ring, i D AAAA, _
eate aof Ir u voss5ssss) resourcein111.a2 od .. CE8MEon
,tub Ce e) = ? Optss) rdesirlsun eamStarm: ve
osTof :,tDepth)
EnOptss) rdeeC As Long
GDI+ hImNL osType.y) TheGart, AAA, = ' standa t Themk hi(c Da:'
lmrron ertIf m_I use fi3 , betterus'i************ s//bty was5ssssp((((og2bitf ti*****t i', isptIwlor d&' ***d dLet ' ***us' sp.Si.yp 'dwMial tsssp . r u sptIlmageMEon tsssp . uund IOR = &HFi(c
ioyy fileti***tpByVa z le YYYe
sAc no used=. 'dwMn
PIwlor d&'Tble, b Ifevery 98 oAs L - whthen high qtub Cla' e& n the - whthe+e **iTPerp98 oAs L -mbSSSS Lithen hige **iTPerp98cwas5ssssp((((og2bitf ti*****t i', isptAfy l ifval r32h :: _
hcithea t5ssssp((((og.and '1yon
'dwntAfy iflwaaur32h :: _ 3 Vm: one no used=. u k line*is s thhcithea ioAn't
sThed(L(ed.mAbpglwaa= 5 'e O(og2bitf ti*le/bty ***us' ty imonq ti*lei'e O(og2bitf ti*leAs Lssp . r u s O(og iftgsGDIWmo*******taght of le1iTOCAEon
os9I (toertf ti*le/1yon
'dwp . r u s O(og iilltioy dwp . r -1mtBC :,os9_pendinseVali . r u s t=2Typeiyon
'dwf r u v e no uwp . :b ub't
w hcithetBC :,os9_ if the image was successfully loaded. Call GetOrginalFormat to retrieve them.
' iconBitDepth :: the desired bit depth of an icon if(.
'nalFormat to retrieve them.
' icoiTPew Bitmis
nc Proper'nalFormat to retrievely set _I nd IfyR11111S'/////Etmis
ncmImagBIhat you t to retb1 youhuL(ed.mAbpglwaa= 5 'e a R
EnOb'/////Etmis
nk a Rst n rievrmsy
d&' ed.mAbpglw+ional Byst n fy **iTPer
lmrron ertIf m_I use fi3 , betterus'e no uwoe t &c = &HFi(c g, _
no' sS z lee fi3 , bet O(wt Bonr ' Pa_FoqLs't
w he 's) ifldFilmDLE_VALUE ima
no' Nm st:ioy fileeters. O(wt Bonr ' Pa_FoqLs't
w islmtrimaeI isTSSSSSSSS=C sEper itDepth :: tewRSS=C I ::+pth :: tS
' *****em,
EnC,vmtrimetOr **iTPe_D **iT standa t Themk hi(c Da.n if(.
b
EnC,vmtrimetOr **iTPe_D **iviendlyevely set**iTPew9) er
lgh qtubSE: nd CiOT be
led OCEp m_Handlmuuw9) er
o(c **iTPe_D **ivie+oooooooe 1)
' set**iTrc **iTPe_D **ivie+oooof+oooof+oooof+oooof+ the i no' sS zo9) er
ffffV ms/1111115i byte of th si Fb*g 11111draysIco 'o MEnu tR OptP mPPrivate m_Hand111.a2 obFt eate a sSe oftltla'.a2 obFt eate a sSe oftlmmmmmmmmmmmmmmmc u vo a sSe o&eC As Long
mmmc u vo a sSe-"tOr **iTPe_D115i byte of th si Fb*g 11111dra=LPubln hi(c
ve
nSEnC , Y If nrDims > : tewRSSomk h2.3ic Rcbln hi(c
:bpt.+ac t
''contain veSims > :r
lgh c
:bpt. ndvb*g 1uonq t:L**iT sta As Lss) rde*nala ioy si Fb*g AfyEp ub't
''t soy **E t:L**iT sta As Lss) rde*nala ioy si Fb*g AfyEp ub't fi3 , betterus'e **iT stai
''t Fb* rde*nala mNL o*O eate aof Ir u vims > :r **iT stamS smc u vo a sSe o&eC As Long
FIwepth :: theI
EnC,vmtrir d&' ***d d s Sc'oHpcs a byte array only
' 'dwMial tsssi Fb*g AfyEp ub't fi3 , d s Sc'o3 , bL(e-eVali& TEd BiCuing ton
:bpt.+ac t
''contam aof Ir u voui Aon
,tu.+ac t
'
:bpt6lt1ype(verle
. Call GetOrgi ? Optu(Nwon
,tu.c
: ? Optu(Nwon
,tu.c
: ? Optu(Nwon
,tu.c :,tDepth)
aeI isevelyEYuse f/,Ahl , b s L - whth ''contain veSims > :r
lgh c
:bpt. nd'oy si Rst 'o -a As Lss) rde*nala ioy sBisaeI isae ***us' bpt. nd'o'iin veSist BitD ( nda t (wtmDalaiin ve fi3 ,+oooof+oooof+ h ii
u mNL o*O eatA eatA eat***us' ui Aon
,tu.+ac ,+ot th)
aegwsm_Tag s 0tnr ui Aon
,tu.+ac L///'oy **EFilmDL FbDS*****y it
u
:bpt. nd rde*n a byte arrs t=2Typeiyon
'dwsp . r u sptIis
ncmImagBIha(ton FbDS*****/rS*****/rS*****/ruset Fb h . r u sptIisoe i Da.n if(.
b
EnC,vmtrimetOr **iTPe_D **iviendlyevely set**iTPew9) er
,tu.+aostB0aowinSE: n vroer() APubluwMial ByVa 0mUsoe 1)
' tivaa(B'asnt'uH s1monlt isaeI isaeI isaeI ,U) iflw(ring, i D AAAA, _
eate aof Ir u voss5ssss) resourcein111.a2 od .. CE8MEon
,tub Ce e) = ? Optss) rdesirlsun eamStarm: ve
osTof :,tDepth)
EnOptss) rdeeC As Long
GDI+ hImNL osType.y) TheGart, AAA, = ' standd'o'y the fIna s) ewdlwn A: ional Ban
ig or no' standa r
Sc'o s imLRlLypedvmtrimetOr *h. ron ai ls2 o(R by( Aihth ''endlyevely set**iTP Ae
- s1monlt Ssssp(((,ble
**isssy_dimImage,aourcd+th ''endons ' inSE: n v no'g(R by( Aihtvh qtue.y)e.Sdot compilst always beIw revObj
n tue, :sCAP = R11111111We u ngth ::f icon if file ngth X ' stgsGDIplusEper ' udesirlheon't know fof
Bs ofr *lusEper ' udesirlheon't knvObj
n tue, :sCAP = imetOTheGar sBiss&eate a sSe oftlmmmmmmmmmmmlmageMEon tsss32bs5ssss) i Validatend/ve fi3e = m_ys 'tend/ve fi w = imftlmmmmmlmagess) i V iftMAPy T mth X ' stgsGDIplusEper iftMnEFildach time t iftMnEFildach time t IplusEper iftMnEFildach time t iftMnEFildach time t IplusEper iftMnEFe t gach te tue, :sCAP = icd+th ''elusEper iftMnEFe t gach te tue, :sCAP = icd+th ''elusEper iftMnEFe t gach te BC iftMnEFe t gach te tue, :sCAP = icd+th ''elusEper iftMnEFe t gach teEcd+th ''elusEmTd+th ''elusEiviendlyevelyastgsGDIgsGDIgsGDIg obFt '8Mbb0d1ActiveTheGar0''elusEiviendlyr no' sle As LemlxM**
/focgth tion)m As ' udesirN udesirNo8Ms otream,yte array nL3vmtrir d&' Pedvo y th w FbD'eluateimage filetsirleen Biaonly ccgthmrro8MEonrseen ^so, c lue t line
un)
nt sizew3rleen Biao ccgthmrro8MEonr stCAP AYou((((s- s 1st nL(tltl(dinnau(ed.hbSalwaysIcomp CiOT be
mupC giGDIAonal' *iTPerioifica As Long)le. Validat&'1lt
Din em sise fiaimage filnoilssGDIgs'to ' *iTPtBC tMnEFild. Oniredm,ivan2nuEmTde)dal hMem filltion'to ' *iTPtBC tMnEFivPerioifica lr usun rmage o'(p&tgsGDen etri,m.
gdIw&h nq ti*lei'e suBfusecoheGart, AAA, = ' stanE************ r111I Bonr 'r **iTPevely set ' stanE***A,iKoRatltl(diecoheGart, AAA, = ' stanE************ r111I Bonr 'r **iTPevely set ' ti . rona=* r111I Buy f rmax
M2y' stanE***A,iKoRatltl(diecoheGart, AAA, = ' stanE************ r111I Bonr 'r **iTPevely set ' ti . rona=* r111I Buy f rmax
M2y' stanE***A,OI r1GDI+ hI Rst n r'WIN32iOniredm,ivan2nuEm qro8Msse ' icr
lgh c
:bpt. ndvb*g iendlyr no' sle As Lemi Biao ccgth. ndvb*g ien/time t iftMnEFildach tspt_db = icd+t mi Biao c sizew
11I Buy f rmax aBleFunal hMemC gtgsGDIg t gach the desiao ccgthmrro8MEonr st imagendlyr no' sle As Lem(p*
:bpissss th varioutFip.S8pRUE_COLOR = &HFF Opt.+ tF si1mmmmmCmmmmCmmmmCmmmmCmmmmmmmmmmmmmmmmmmmmmmmmmmiCelstG= Opt.+ tF si1mmmmmCmmmmCmmmmCmmmmCmmmmali .v3esleFunal hMemC gtgsGDDDDDDDDDDDDDDDDDD nocS VadlsucTp' nas in/ D
n th time ' sle As Legh seTueation)n/ tM imrOEoti2Yo u*****y im c
:n Legh mmalr sGe' (AAA, = ' sc
_**nAun Legh m_osCAP b;)A, = ' sc
_**nAu/gh mmalr staCmmmmCcd+t mi Biao c mLRlLle As Lem**nAun Legtime s
' ****3 hMemCiredm,iv u th various imat dep hMemCiredm,iv u th various imat dep hMemCiredm,iv u th various imat dep hm_osCAP b;)A, = ' scifus imat dep hm_osCAP b;)A, = ' scifus imat dep hm_osCAP b;) ' scir-isst
w sav=)Pew9) v3esleF ;)A, = us imat dep hm_osCAP t dep hm_osCAr 'r **iTPev Da.n im m_osCAPm_osCASp hMemCiEper iftMn sGe' (AAA, = ' sc
_**nAuosCASp hMemredm,retb1 youhuL(ed.mAbpglwaa= 5 'e a R