Sujet : Re: Blend2d Save Option
De : aldo.w.buratti (at) *nospam* gmail.com (abu)
Groupes : comp.lang.tclDate : 30. Nov 2024, 16:20:38
Autres entêtes
Organisation : RetroBBS
Message-ID : <ec494801e5061bd31ee3d72ddbf9db98@www.rocksolidbbs.com>
References : 1 2 3
User-Agent : Rocksolid Light
Hi, I'm the author of Blend2.
About your interoperability question:
Blend2d can *load* PNG, BMP, QOI files (JPG encoder is not
implemented,yet)
$sfc load mypic.png
and can also import SVG files
# create a new BL::Svgdoc object by loading an SVG files
set mysvg [BL::Svgdoc new "mySVG.svg"]
# add it to the BL:Surface $sfc
$sfc paint $mysvg ;# .. plus a lot of options
It can also import tk-images
image create photo myimage
.. fill myimage ....
$sfc readFromTkPhoto myimage
(this could be a workaround for loading unsupported image formats (GIF,
JPG, ... )
Blend2d can *save* the contents of a BL::surface as PNG, BMP, QOI, JPG
$sfc save myResult.png
or, it can export its contents in a a tk-image
image create photo myimg
$sfc writeToTkphoto myimg
Blend2d *cannot* save-as SVG or PDF; this is impossible since a
BL:Surface is nothing more than a RGBA image.
-- Tip: take a look at https://abu-irrational.github.io/tclBlend2d-GalleryIt contains screenshots of about 90 Blend2d demos.You can find the source code for most of these demos within the currenttclBlend2d package.
I'm going to release a new version of Blend2d plus a separate package of
demos containing the source code of all the demos (contributions are
welcome).