ش | ی | د | س | چ | پ | ج |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
زنجیره فیلتر را مدیریت می کند. یک شی ImageProcess را می توان با استفاده از "WIA.ImageProcess" به عنوان ProgID در فراخوانی به CreatObject ایجاد کرد.
مثال Image Resize
Dim Thumb 'As ImageFile
Dim Img 'As ImageFileDim IP 'As ImageProcess"Img ="WIA.ImageFile"IP ="WIA.ImageProcess"Thump="WIA.ImageFileThumb.LoadFile "C:\WINDOWS\Web\Wallpaper\BlissThumb.bmp"Img.LoadFile "C:\WINDOWS\Web\Wallpaper\Bliss.bmp"Set IP.Filters(1).Properties("ImageFile") = ThumbIP.Filters.Add IP.FilterInfos("Stamp").FilterIDIP.Filters(1).Properties("Top") = Img.Height - Thumb.HeightIP.Filters(1).Properties("Left") = Img.Width - Thumb.WidthSet Img = IP.Apply(Img)Img.SaveFile "C:\WINDOWS\Web\Wallpaper\BlissStamp.bmp"
شامل مجموعه ای از همه اشیاء FilterInfo موجود است. برای جزئیات بیشتر در مورد دسترسی به شی FilterInfos ، از ویژگی FilterInfos (ImageProcess) در شی ImageProcess دیدن کنید.
To get further documentation for ImageProcess
, we can just "ask it"! Run this:
()Sub List_WIA_ImageProcess_Filters Dim f As Object, x As Long For Each f In CreateObject("WIA.ImageProcess").FilterInfos x = x + 1 Debug.Print "#" &x &": " &f.Name &" = " &f.Description &vbLf Next fEnd Sub
RotateFlip = Rotates in 90 degree increments and Flips, horizontally or vertically.
RotationAngle - Set the RotationAngle property to 90, 180, or 270 if you wish to rotate, otherwise 0 [the default]FlipHorizontal - Set the FlipHorizontal property to True if you wish to flip the image horizontally, otherwise False [the default]FlipVertical - Set the FlipVertical property to True if you wish to flip the image vertically, otherwise False [the default]FrameIndex - Set the FrameIndex property to the index of a frame if you wish to modify a frame other than the ActiveFrame, otherwise 0 [the default]
Crop = Crops the image by the specified Left, Top, Right, and Bottom margins.
Left - Set the Left property to the left margin (in pixels) if you wish to crop along the left, otherwise 0 [the default]Top - Set the Top property to the top margin (in pixels) if you wish to crop along the top, otherwise 0 [the default]Right - Set the Right property to the right margin (in pixels) if you wish to crop along the right, otherwise 0 [the default]Bottom - Set the Bottom property to the bottom margin (in pixels) if you wish to crop along the bottom, otherwise 0 [the default]FrameIndex - Set the FrameIndex property to the index of a frame if you wish to modify a frame other than the ActiveFrame, otherwise 0 [the default]
Scale = Scales image to the specified Maximum Width and Maximum Height preservingAspect Ratio if necessary.
MaximumWidth - Set the MaximumWidth property to the width (in pixels) that you wish to scale the image to.MaximumHeight - Set the MaximumHeight property to the height (in pixels) that you wish to scale the image to.PreserveAspectRatio - Set the PreserveAspectRatio property to True [the default] if you wish to maintain the current aspect ration of the image, otherwise False and the image will be stretched to the MaximumWidth and MaximumHeightFrameIndex - Set the FrameIndex property to the index of a frame if you wish to modify a frame other than the ActiveFrame, otherwise 0 [the default]
Stamp = Stamps the specified ImageFile at the specified Left and Top coordinates.
ImageFile - Set the ImageFile property to the ImageFile object that you wish to stampLeft - Set the Left property to the offset from the left (in pixels) that you wish to stamp the ImageFile at [default is 0]Top - Set the Top property to the offset from the top (in pixels) that you wish to stamp the ImageFile at [default is 0]FrameIndex - Set the FrameIndex property to the index of a frame if you wish to modify a frame other than the ActiveFrame, otherwise 0 [the default]
Exif = Adds/Removes the specified Exif Property.
Remove - Set the Remove property to True if you wish to remove the specified Exif property, otherwise False [the default] to add the specified exif propertyID - Set the ID property to the PropertyID you wish to Add or RemoveType - Set the Type property to indicate the WiaImagePropertyType of the Exif property you wish to Add (ignored for Remove)Value - Set the Value property to the Value of the Exif property you wish to Add (ignored for Remove)FrameIndex - Set the FrameIndex property to the index of a frame if you wish to modify a frame other than the ActiveFrame, otherwise 0 [the default]
#6: Frame = Adds/Removes the specified Frame.
Remove - Set the Remove property to True if you wish to remove the specified FrameIndex, otherwise False [the default] to Insert the ImageFile before the specified FrameIndexImageFile - Set the ImageFile property to the ImageFile object whose ActiveFrame that you wish to add (ignored for Remove)FrameIndex - For Remove, set the FrameIndex property to the index of the frame you wish to remove, otherwise for add, set the FrameIndex to the index of the frame to insert the ImageFile before, otherwise 0 [the default] to append a frame from the ImageFile specified
#7: ARGB = Updates the image bits with those specified.
ARGBData - Set the ARGBData property to the Vector of Longs that represent the ARGB data for the specified FrameIndex (the width and height must match)FrameIndex - Set the FrameIndex property to the index of the frame whose ARGB data you wish to modify, otherwise 0 [the default] to modify the ActiveFrame
#8: Convert = Converts the resulting ImageFile to the specified type.
FormatID - Set the FormatID property to the supported raster image format desired, currently you can choose from wiaFormatBMP, wiaFormatPNG, wiaFormatGIF, wiaFormatJPEG, or wiaFormatTIFFQuality - For a JPEG file, set the Quality property to any value from 1 to 100 [the default] to specify quality of JPEG compressionCompression - For a TIFF file, set the Compression property to CCITT3, CCITT4, RLE or Uncompressed to specify the compression scheme, otherwise LZW [the default]