stdVBA icon indicating copy to clipboard operation
stdVBA copied to clipboard

`stdImage` improvements

Open sancarn opened this issue 9 months ago • 1 comments

Tracker

  • [ ] CreateFromBinary(ByRef b() As Byte, ByVal format as stdImgFormat) As stdImage
  • [ ] CreateFromDataURL(ByVal sURL as string) as stdImage
  • [X] CreateFromFile(ByVal sPath As String, Optional ByVal format as stdImgFormat = stdImgFormatDefault, optional byval transparentColor as Long = 0) As stdImage
    • [X] BMP, GIF, JPEG, PNG, TIFF, WMF, EMF
    • [ ] WEBP
  • [X] CreateFromUrl(ByVal sURL As String, Optional ByVal format as stdImgFormat = stdImgFormatDefault) As stdImage
    • [ ] AutoProxy?
    • [ ] Possibly remove? stdHTTP should really be used...
  • [X] CreateFromHBitmap(ByVal hBitmap As LongPtr) As stdImage
  • [X] CreateFromClipboard() As stdImage
  • [X] CreateFromIPictureDisp(ByVal picture As stdole.IPictureDisp) As stdImage
    • [ ] Need an example
  • [X] CreateFromStdPicture(ByVal picture As stdole.stdPicture) As stdImage
  • [x] CreateFromIPicture(ByVal picture As stdole.IPicture) As stdImage
    • [ ] Need an example
  • [X] CreateFromExcelIPicture(ByVal picture As Excel.IPicture) As stdImage
    • [ ] Need an example
  • [X] CreateFromShape(ByVal shp As Object) As stdImage
  • [X] CreateFromChart(ByVal chart As Object) As stdImage
  • [x] CreateFromHICON(ByVal hicon as LongPtr) as stdImage
  • [X] Get HBitmap() as LongPtr
  • [X] Get HICON() as LongPtr
  • [X] ToBinary(Optional ByVal eFormat As stdImgFormat = stdImgFormatDefault) As Byte()
    • [ ] Remove hack
  • [X] ToFile(ByVal FileName As String, Optional format As stdImgFormat = stdImgFormatDefault, Optional ByVal Quality As Byte = 80, Optional ByVal TIFF_ColorDepth As Long = 24, Optional ByVal TIFF_Compression As Long = 6)
  • [X] ToClipboard()
    • [ ] Remove hack
  • [X] ToTempFile(Optional ByVal eFormat As stdImgFormat = stdImgFormatDefault) as string
  • [X] ToSheet(ByVal ws as Worksheet, Optional ByVal Top as Double = 0 , Optional ByVal Left as Double = 0, optional ByVal compress as MsoPictureCompress) as Object
  • [X] ToUIControl(Byval oControl as object)
  • [ ] ToDataUrl(Optional ByVal eFormat As stdImgFormat = stdImgFormatDefault) as string
  • [X] ToShapeFill(ByVal shp As Object)
  • [X] ToStdPicture() as stdole.StdPicture
  • [x] CreateFromScreen() - I.E. Screenshot
  • [X] CreateFromWindow(ByVal hwnd as LongPtr) - Create screenshot from window
  • [X] Colors() as Long() - Obtain colors from image

Resources

https://stackoverflow.com/questions/1507385/how-do-i-convert-a-stdole-stdpicture-to-a-different-type

sancarn avatar May 18 '24 21:05 sancarn