AspJpeg V1.5.0 cracked version
How to use aspjpeg component aspjpeg is a very powerful image processing component, pure English version. However, there are already free versions and cracked versions, but there are not many articles that introduce them in detail and in-depth. Even if there are, they only involve image thumbnails and image watermarks. Maybe it's because it's in pure English.Using aspjepg you can mainly do:
Image thumbnail
Picture watermark
security code technology
Picture cutting
Picture merge
Database support
1. Picture thumbnails.
<%
Set Jpeg = Server.CreateObject(Persits.Jpeg) calls the component
Path = Server.MapPath(images) & /clock.jpg The path of the image to be processed
Jpeg.Open Path opens the picture
The height and width are 1/2 of the original image
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2
save image
Jpeg.Save Server.MapPath(images) & /clock_small.jpg
%>
<IMG SRC=images/clock_small.jpg> View the processed image.
2. Picture watermark.
<%
Set Jpeg = Server.CreateObject(Persits.Jpeg)
Jpeg.Open Server.MapPath(images/dodge_viper.jpg)
Start writing text
Jpeg.Canvas.Font.Color = &000000'' red color
Jpeg.Canvas.Font.Family = Courier New Font
Jpeg.Canvas.Font.Bold = True whether to bold
Jpeg.Canvas.Print 10, 10, Copyright (c) XYZ, Inc.
Print coordinate x Print coordinate y Characters to be printed
The following is the border processing of the picture
Jpeg.Canvas.Pen.Color = &H000000'' black color
Jpeg.Canvas.Pen.Width = 2 brush width
Jpeg.Canvas.Brush.Solid = False whether to bold
Jpeg.Canvas.Bar 1, 1, Jpeg.Width, Jpeg.Height
Start X coordinate Start Y coordinate input length input height
Jpeg.Save Server.MapPath(images/dodge_viper_framed.jpg) Save
%> .
3. Security code.
The principle of Ping An Ma is similar to adding a watermark.
<%
Function to generate security code
function make_randomize(max_len,w_n) max_len generates length, w_n: 0 may contain letters, 1: only numbers
randomize
for intcounter=1 to max_len
whatnext=int((1-0+1)*rnd+w_n)
if whatnext=0 then
upper=122
lower=97
else
upper=57
lower=48
end if
strnewpass=strnewpass & chr(int((upper-lower+1)*rnd)+lower)
next
make_randomize=strnewpass
end function
%> .
Image of generated security code.
<%random_num=make_randomize(4,1) generates a 4-digit security code
session(random_num)=random_num Why call session? It is completely meaningless without the session security code. hehe.
Set Jpeg = Server.CreateObject(Persits.Jpeg) calls the component
Jpeg.Open Server.MapPath(infos/random_pic/random_index.gif) Open the prepared picture
Jpeg.Canvas.Font.Color = &H006699
Jpeg.Canvas.Font.Family = Arial Black
Jpeg.Canvas.Font.Bold = false
Jpeg.Canvas.PrintText 0, -2, random_num
jpeg.save Server.MapPath(infos/random_pic/random_index.bmp) save
%>
<img src=infos/random_pic/random_index.bmp border=0 align=absmiddle>
4. Picture cutting.
For a long time, people who don't know about aspjpeg thought that they couldn't use it for cutting.
In fact, there is such a method
crop x1,y1,x2,y2
Cut the x coordinate of the upper left corner of the rectangle and the y coordinate of the lower right corner of the rectangle.
I will give a demonstration below.
Set Jpeg = Server.CreateObject(Persits.Jpeg)
jpeg.open server.MapPath(/pic/1.gif)
jpeg.width=70
Jpeg.Height = Jpeg.OriginalHeight*70 / jpeg.Originawidth
jpeg.crop 0,0,70,52 Starting to cut is actually to remove the lower part that exceeds 52 pixels.
jpeg.save server.MapPath(/temp_pic/small_1.gif) save
5. Picture merging.
Here we are going to add the logo image to the dodge_viper.jpg image
Set Photo = Server.CreateObject(Persits.Jpeg)
PhotoPath = Server.MapPath(images) & /dodge_viper.jpg
Photo.Open PhotoPath
Set Logo = Server.CreateObject(Persits.Jpeg)
LogoPath = Server.MapPath(images) & /clock.jpg
Logo.Open LogoPath .
Logo.Width = 70
Logo.Height = Logo.Width * Logo.OriginalHeight / Logo.OriginalWidth .
Photo.DrawImage 0, 0, Logo .
Photo.SendBinary The output method of sendBinary is used here. Of course, you can also save the changed dodge_viper.jpg first and then enter it. I personally don't like to use the sendBinary method because it is prone to errors when the network speed is slow. Not much in terms of speed either.
6. Database support.
Not much to say here. In fact, it is the Binary method. As we all know, images can only be stored as binary files when stored in the database. So the code was written lazily. .
7. More methods are introduced.
Canvas.Line(Left, Top, Right, Bottom)
draw a straight line
Canvas.Ellipse(Left, Top, Right, Bottom)
draw an ellipse
Canvas.Circle(X, Y, Radius)
draw a circle
Canvas.Bar(Left, Top, Right, Bottom)
Draw a rectangle with the code introduced on it
Canvas.Font.ShadowColor
text shadow color
Canvas.Font.ShadowXOffset As Long
Shadow X coordinate setting
Canvas.Font.ShadowYOffset As Long
Y coordinate setting
Canvas.Font.BkMode As String
text background .