image-procs.tcl

Shared, disposable resized-image cache for attachment integrations.

Location:
packages/attachments/tcl/image-procs.tcl

Procedures in this file

Detailed information

attachments::image::directory (private)

 attachments::image::directory

Return the private cache directory. Generated files are never public resources.

Partial Call Graph (max 5 caller/called nodes):
attachments::image::expire attachments::image::expire (private) attachments::image::directory attachments::image::directory attachments::image::expire->attachments::image::directory attachments::image::variant attachments::image::variant (public) attachments::image::variant->attachments::image::directory ad_tmpdir ad_tmpdir (public) attachments::image::directory->ad_tmpdir

Testcases:
No testcase defined.

attachments::image::expire (private)

 attachments::image::expire

Remove disposable variants after seven days; originals remain in the CR.

Partial Call Graph (max 5 caller/called nodes):
attachments::image::directory attachments::image::directory (private) attachments::image::expire attachments::image::expire attachments::image::expire->attachments::image::directory

Testcases:
No testcase defined.

attachments::image::variant (public)

 attachments::image::variant path width [ identity ]

Return a cached, smaller bitmap, or the original when conversion is unavailable. Callers must authorize access to the original BEFORE calling this helper. An empty width requests the original. Identity should include the CR revision ID for committed images; drafts are distinguished by their private path.

Parameters:
path (required)
width (required)
identity (optional)

Partial Call Graph (max 5 caller/called nodes):
packages/forums/www/markdown-image.tcl packages/forums/ www/markdown-image.tcl attachments::image::variant attachments::image::variant packages/forums/www/markdown-image.tcl->attachments::image::variant packages/news/www/markdown-image.tcl packages/news/ www/markdown-image.tcl packages/news/www/markdown-image.tcl->attachments::image::variant ad_log ad_log (public) attachments::image::variant->ad_log attachments::image::directory attachments::image::directory (private) attachments::image::variant->attachments::image::directory attachments::image::widths attachments::image::widths (public) attachments::image::variant->attachments::image::widths image::convert_binary image::convert_binary (public) attachments::image::variant->image::convert_binary

Testcases:
No testcase defined.

attachments::image::widths (public)

 attachments::image::widths

Supported responsive image widths in pixels. Keep in sync with the Markdown editor.

Partial Call Graph (max 5 caller/called nodes):
attachments::image::variant attachments::image::variant (public) attachments::image::widths attachments::image::widths attachments::image::variant->attachments::image::widths packages/forums/www/markdown-image.tcl packages/forums/ www/markdown-image.tcl packages/forums/www/markdown-image.tcl->attachments::image::widths packages/news/www/markdown-image.tcl packages/news/ www/markdown-image.tcl packages/news/www/markdown-image.tcl->attachments::image::widths

Testcases:
No testcase defined.
[ show source ]