You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-31Lines changed: 50 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,53 +9,72 @@ The ASPNetImage component essentially exposes part of the System.Drawing namespa
9
9
A debug and release build of the DLL is included in the repository, or you can compile it yourself after generating a signing key. Checkout a working copy of the source repository or you may download the current release in the Downloads section.
10
10
11
11
12
-
# Implementation Details
13
-
It is a work in progress and any help completing the object is appreciated. All properties and methods are stubbed out, but as of this writing, currently only a small subset of properties and methods are implemented either in part or whole.
12
+
# Properties and Methods
13
+
ASPNetImage is a work in progress and any help completing the object is appreciated. All properties and methods are stubbed out, but as of this writing, currently only a small subset of properties and methods are implemented either in part or whole.
14
14
15
15
16
-
**Fully Implemented**
16
+
## Properties
17
17
18
-
*Properties:*
18
+
**AutoClear*:boolean<br />If true, class will automatically dispose image data when the SaveImage method is called. Default is true.
19
19
20
-
* AutoClear
21
-
* Expires - Always returns future date
22
-
* Filename
23
-
* JPEGQuality
24
-
* RegisteredTo - Returns "This Organization" by default, but can be set to any string
25
-
* Version - Returns last known ASPImage version with "(ASPNetImage)" appended
20
+
**ConstrainResize*:boolean<br />When set to true, automatically crops the image during a resize to fit the dimensions and retain the original image's aspect ratio. Default is true. _New with ASPNetImage._
26
21
27
-
*Methods:*
22
+
**Expires*:DateTime<br />Returns the date that the component expires. Included for compatibility. Always returns future date
28
23
29
-
* BrightenImage
30
-
* ClearImage
31
-
* CropImage
32
-
* DarkenImage
33
-
* FillRect
34
-
* FlipImage
35
-
* GetImageFileSize
36
-
* LoadImage
37
-
* Resize
24
+
**Error*:string<br />_Partially implemented._ Returns the last error from LoadImage and SaveImage methods only.
38
25
26
+
**Filename*:string<br />Gets or sets the full path and filename to be used by the SaveImage method
39
27
40
-
**Partially Implemented**
28
+
**ImageFormat*:int<br />_Partially implemented._ Gets or sets the image format to be used by the SaveImage method. Currently only JPEG format is supported for output. Enumerated. See ASPNetImage.ImageFormats.
41
29
42
-
*Properties:*
30
+
**JPEGQuality*:int<br />Gets or sets the output quality percentage of JPEG images when SaveImage is called to save a JPEG. Valid amounts are 1 to 100.
43
31
44
-
* Error - Returns the error from LoadImage and SaveImage methods only.
32
+
**RegisteredTo*:string<br />Gets or sets the name that the component is registered to. Included for compatibility. Returns "This Organization" by default, but can be set to any string
45
33
46
-
* ImageFormat - Only JPEG, BMP, GIF and PNG formats are supported for output
34
+
**Version*:string<br />Returns last known ASPImage version with "(ASPNetImage)" appended
47
35
48
-
*Methods:*
49
36
50
-
* ResizeR - Calls the Resize method.
37
+
## Methods
51
38
52
-
*RotateImage - Only rotates at 90, 180 and 270 degrees clockwise
39
+
**BrightenImage*<br />Increases the brightness of the image
53
40
54
-
*SaveImage - Saves the image, but currently only in JPEG format.
41
+
**ClearImage*<br />Clears the image
55
42
43
+
**CropImage*<br />Crops the image
56
44
57
-
**Additional Properties And Methods**
45
+
**DarkenImage*<br />Darkens the image
58
46
59
-
*ConstrainResize - When set to true, automatically crops the image during a resize to fit the dimensions and retain the original image's aspect ratio
47
+
**FillRect*<br />Fills a rectangle area of the image with a given color.
60
48
61
-
* GetImageSize - Returns the image dimensions for the currently loaded image
49
+
**FlipImage*<br />Flips the image
50
+
51
+
**GetImageFileSize*<br />Returns the image dimensions for the image specified by full file path and name. Currently incurs memory hit as image has to be loaded to determine dimensions.
52
+
53
+
**GetImageSize*<br />Returns the image dimensions for the currently loaded image. _New with ASPNetImage._
54
+
55
+
**LoadImage*<br />Loads an image from disk at the specified filepath
56
+
57
+
**Resize*<br />Resizes the image
58
+
59
+
**ResizeR*<br />_Partially implemented._ Calls the Resize method.
60
+
61
+
**RotateImage*<br />_Partially implemented._ Rotates the image. Currently only rotates at 90, 180 and 270 degrees clockwise
62
+
63
+
**SaveImage*<br />_Partially implemented._ Saves the image, but currently only in JPEG format.
64
+
65
+
66
+
# Troubleshooting
67
+
68
+
**Troubleshooting Installation Issues**
69
+
70
+
* Verify that the .NET Framework v2.0 is installed and working properly.
71
+
72
+
* Ensure that you've registered the DLL with REGASM.EXE with the /tlb and /codebase command line switches (see the included register.bat file). You may want to unregister the DLL and re-register them to confirm.
73
+
74
+
* Make sure the DLL and TLB files have the correct file permissions. Give read/write/execute access to NETWORK, NETWORK_SERVICE and the IUSER_[machineName] accounts.
75
+
76
+
If you are using an unsigned DLL, you will receive the following error message when registering the DLL with REGASM.EXE:
77
+
78
+
> RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.""
79
+
80
+
The object should still work, but I'd recommend unregistering it, compiling and signing the DLL yourself before registering it again so that you don't receive the warning message. Visual Studio 2005 and up can do this automatically from the Project Properties panel on the "Signing" tab. Just pick "< New >" and follow the prompts.
0 commit comments