Skip to content

Releases: iseahound/ImagePut

v1.2

07 Oct 23:23
Compare
Choose a tag to compare

Support for streams as a intermediate has been added to base64, file, hex, RandomAccessStream, stream, and url. Previously, ImagePutFile(url) would convert via: url → decode → pixels → encode → file. Now it can directly convert: url → stream → file.

  • Increase speed by skipping encoding and decoding of compressed images when using streams.
  • File hashes are now preserved when moving between stream compatible data types.
  • File extensions are also preserved from the input where possible.
  • For previous behavior, the flag ForceDecodeImagePixels has been added.
  • An additional flag, ForcePushImageToMemory controls whether pBitmaps should load their pixel data immediately.

ImageEqual has been completely revamped.

  • Will now throw errors if supplied with an improper image.
  • Calling with one image parameter will now verify that image is valid. Previously, ImageEqual(image) always returned true.
  • Bitmaps are now cloned to solve the problem where multiple calls to LockBits would fail, if the bitmaps shared the same stream. Calling LockBits from the clone will lock the original bitmap so the underlying stream is never locked.
  • CloneImage has been replaced with GdipCloneBitmapAreaI to preserve the native PixelFormat when cloning.
  • Support for bitmaps with negative stride is implicit when cloning.

Bugfixes

  • Declared types {type:image} were broken by v1.1.
  • A 24-bit image passed to put_clipboard would cause the script to crash.
  • Some applications expected a bottom-up bitmap from the clipboard.
  • Not supplying a valid window handle to OpenClipboard would cause EmptyClipboard to crash.
  • Calling ObjRelease() on a clipboard stream would delete the clipboard data.
  • select_codec() now throws instead of defaulting to PNG.

Internal Documentation

  • from_XX and put_XX has been factored into get_XX and set_XX if the function used a stream.
  • There are two types of streams: pStream from CreateStreamOnHGlobal and pMemoryStream from SHCreateMemStream.
  • Calls to SHCreateMemStream (pMemoryStream) have been removed as GetHGlobalFromStream is only supported on pStreams.
  • All get_XX functions create pStreams. All set_XX functions read both pStream and pMemoryStream.
  • Multiple bitmaps created on a single stream are now resolved by calling either GdipImageForceValidation through the ForcePushImageToMemory flag, or by calling GdipCloneImage on a given pBitmap.
  • put_screenshot now uses bilinear scaling.
  • put_screenshot defaults to the top left corner of the screen.
  • Return values of uint have been replaced with HRESULT in v2.

v1.1

29 Sep 01:02
Compare
Choose a tag to compare

This release contains several important bugfixes.

  • Default file names generated by ImagePutFile are now unique.
  • URL validation RegEx has been updated be more selective.
  • Streams are no longer double freed which could potentially cause memory crashes.
  • [v2] ImagePutWindow now allows the script to exit after window closed.
  • [v2] A temporary file created by ImagePutWallpaper is now properly deleted after 2 seconds.