Documentation
¶
Overview ¶
Package imageutil provides utilities for image extraction and writing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImageWriter ¶
type ImageWriter struct {
OutputDir string // Directory to write images to
RelativeDir string // Relative path for markdown links
// contains filtered or unexported fields
}
ImageWriter handles writing extracted images to disk
func NewImageWriter ¶
func NewImageWriter(mdOutputPath string) (*ImageWriter, error)
NewImageWriter creates a new ImageWriter for the given markdown output path. For output.md, it creates and uses output_images/ directory.
func (*ImageWriter) GenerateFilename ¶
func (w *ImageWriter) GenerateFilename(format string) string
GenerateFilename creates a unique filename like "image_001.png"
func (*ImageWriter) WriteImage ¶
func (w *ImageWriter) WriteImage(img *models.ImageItem) (string, error)
WriteImage writes an image to disk and returns the relative path for markdown. If the image already has an OutputPath set, it uses that; otherwise generates one.
Click to show internal directories.
Click to hide internal directories.