ImageOptimizer.Net (ing) hakkında yorumlar / Yeni Yorum Yaz
| kodları çevrilmiştir... / ImageOptimizer.Net - hexedecimal - 23.05.2008 / Cevapla |
mailimden bana ulasirsaniz kodlarin tamamini veririm...
public enum FrameType { None = 0, Frame1 = 1, Frame2 = 2, Frame3 = 3 }
internal class ImageInFramer { // Constructors public ImageInFramer (Bitmap source, Bitmap frame, int frameWidth, int frameHeight);
// Methods public Image putInFrame (); private void resizeFrame (); private void MixFrameWith_SourceImage ();
// Properties public int FrameWidthBorder { get; set; } public int FrameHeightBorder { get; set; } public Bitmap SourceImage { get; set; } public Bitmap Frame { get; set; }
// Instance Fields private int _FrameWidthBorder; private int _FrameHeightBorder; private Bitmap _SourceImage; private Bitmap _Frame; }
[ToolboxBitmap(typeof(PictureBox))"> public class ImageOptimizer : Component { // Constructors public ImageOptimizer (int maxwidth, int maxheight, int imgquality); public ImageOptimizer (int maxwidth, int maxheight, int imgquality, Color fadecolor, int fadewidthpercent); public ImageOptimizer ();
// Methods private Image putInFrame (Image source); private Image Shadow (Image source); private Image FadeAroundImage (Image source, Color FadeColor, int fadeWidth); public Image Optimize (Image sourceImage); private void AddDemoSignTo (Image source); public void Optimize (string OriginalImagePath, string OptimizedImagePath); public byte["> Optimize (HttpPostedFile postedFile); public void Optimize (string ImagePath); public void Optimize (HttpPostedFile postedFile, string OptimizedImagePath);
// Properties [Description("Maximum width of optimized image. Image will be resized so that its width doesn't exceed this value."), Bindable(true), Category("Appearance")"> public int MaxWidth { get; set; } [Category("Appearance"), Description("Maximum height of optimized image. Image will be resized so that its height doesn't exceed this value."), Bindable(true)"> public int MaxHeight { get; set; } [Description("Maximum quality of optimized image."), Category("Appearance"), Bindable(true)"> public int ImgQuality { get; set; } [Category("Appearance"), Bindable(true), Description("the fade color of the final optimized image")"> public Color FadeAround_Color { get; set; } [DefaultValue(FrameType.Frame1), Category("Appearance"), Bindable(true), Description("Frame Dype description.")"> public FrameType FrameType { get; set; } [Description("Special effect description."), Category("Appearance"), Bindable(true)"> public SpecialEffect SpecialEffect { get; set; } [Category("Appearance"), Description("the percentage that the optimized image will be faded around between 0-100."), Bindable(true)"> public int FadeWidthPercent { get; set; }
// Instance Fields private int _MaxWidth; private int _MaxHeight; private int _ImgQuality; private Color _FadeAround_Color; private FrameType _FrameType; private SpecialEffect _SpecialEffect; private int _FadeWidthPercent; }
internal class ImageRoundFader { // Constructors public ImageRoundFader (Bitmap img);
// Methods public void FadeAround (); public void FadeAroundTo (Color FadeTo_Color, int FadeWidthPercent, int MaxFadeWidth); private void SetColor (double Nearity);
// Instance Fields public Bitmap Picture; private int FadeWidth; private int ImageWidth; private int ImageHeight; private Color FadeToColor; private int x; private int y; private Color CurrentPixel;
// Nested Types private enum eSide { Left = 0, Right = 1, Top = 2, Buttom = 3 } }
public enum SpecialEffect { None = 0, FadeAround = 1, PutInFrame = 2, Shadow = 3 } |
|
1 - 26 arası / 1 toplam yorum
Yorum Yaz
|