¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > CxImage ÄÄÆ÷³ÍÆ® - À̹ÌÁö ȸÀü ¿¹Á¦

µî·ÏÀÏ : 2017-07-04 17:17 Á¶È¸¼ö : 53,036

 
¾Æ·¡ÀÇ ³»¿ëÀº CxImageATL ¸Þ´º¾ó ÀÔ´Ï´Ù.

	Type_LR	    = Request("type_LR")		'left , right
	Return_url  = Request("Return_url")

	filename1  = Request("filename")
	FILE_DIR1  = Server.MapPath(FILENAME1)

	filename2  = filename1
	FILE_DIR2  = Server.MapPath(filename2)

	aaa= getMakeThumbNail(file_dir1, file_dir2, 500, 500, false,Type_LR)


	<%  
	Function getMakeThumbNail(ImageFullPath, TargetPath, ImageWidth, ImageHeight, bStretch, Type_LR)
	On Error Resume Next
		If IsNull(ImageFullPath) Or Trim(ImageFullPath) = "" Then Exit Function
		If IsNull(ImageWidth) Or Trim(ImageWidth) = "" Then	   ImageWidth	= 100
		If IsNull(ImageHeight) Or Trim(ImageHeight) = "" Then  ImageHeight	= 100

		If ImageWidth <= 0 Then	  ImageWidth   = 100
		If ImageHeight <= 0 Then  ImageHeight  = 100

		Dim imgName	 : imgName	= Mid( ImageFullPath, InstrRev(ImageFullPath, "\") + 1 )
		Dim imgPath	 : imgPath	= Replace( ImageFullPath, "\" & imgName, "" )
		Dim onlyName : onlyName	= Left( imgName, InStrRev(imgName, ".") - 1 )
		Dim imgExt	 : imgExt	= LCase( Mid(imgName, InStrRev(imgName, ".") + 1) )

		Dim saveName : saveName = TargetPath 

		Dim ImageType : ImageType = 2
		Select Case imgExt
			Case "bmp", "wmf", "raw"	: ImageType = 1
			Case "gif"	: ImageType = 2
			Case "jpg","jpeg"	: ImageType = 3
			Case "png"	: ImageType = 4
			Case "ico"	: ImageType = 5
			Case "tif"	: ImageType = 6
			Case "tga"	: ImageType = 7
			Case "pcx"	: ImageType = 8
			Case "jp2"	: ImageType = 11
			Case "jpc"	: ImageType = 12
			Case "jpx"	: ImageType = 13
			Case "pnm"	: ImageType = 14
			Case "ras"	: ImageType = 15
			Case Else	:	Exit Function
		End Select

		Dim objCxImage	:	Set objCxImage = Server.CreateObject("CxImageATL.CxImage")

		Call objCxImage.Load(ImageFullPath, ImageType)	
		Call objCxImage.IncreaseBpp(24)					
		
		
		If Type_LR="left" then
			Call objCxImage.RotateLeft()					
		else
			Call objCxImage.RotateRight()					
		End if
		

		Dim ThumbWidth	: ThumbWidth  = ImageWidth	
		Dim	ThumbHeight	: ThumbHeight = ImageHeight

		If bStretch = False Then
			Dim SourceWidth  : SourceWidth  = CDbl(objCxImage.GetWidth())
			Dim SourceHeight : SourceHeight = CDbl(objCxImage.GetHeight())

			Dim sizeX : sizeX = SourceWidth / ImageWidth
			Dim sizeY : sizeY = SourceHeight / ImageHeight
			Dim ThumbNail_Size	:	ThumbNail_Size = sizeY

			If sizeX > sizeY Then	ThumbNail_Size = sizeX
			If ThumbNail_Size < 1 Then	ThumbNail_Size = 1

			ThumbWidth	= Int(SourceWidth / ThumbNail_Size)
			ThumbHeight	= Int(SourceHeight / ThumbNail_Size)
		End If

		Call objCxImage.Resample(ThumbWidth, ThumbHeight, ImageType)

		Call ObjCxImage.Save(saveName, 3)										

		Set objCxImage = Nothing

		If Err.Number <> 0 Then
			getMakeThumbNail = ""
		Else
			getMakeThumbNail = Mid( saveName, InstrRev(saveName, "\") + 1 )
		End If
	On Error GoTo 0
	End Function
	%>




 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.