$ show xyxiao001/vue-cropper
vue-cropper is a Vue.js image cropping component supporting both Vue 2 and Vue 3. It provides an interactive cropping UI with features such as mouse/touch drag, zoom, rotation, EXIF-orientation correction, and multiple output formats (base64/blob). The component is self-contained within a single Vue file and relies on a minimal helper library for EXIF data parsing. It is distributed as a UMD/ES library and can be used via npm or CDN. The architecture is monolithic, with the cropping logic, coordinate calculations, and canvas rendering all encapsulated within the component, exposing a rich set of props, methods, and events for integration.
The LLM identified 1 files worth highlighting for reuse:
A self-contained, promise-based EXIF orientation parser that extracts image rotation metadata from various input types (base64, blob, URL). It demonstrates skillful use of ArrayBuffer, DataView, and byte-level decoding to parse JPEG EXIF tags. This module can be extracted and reused in any JavaScript project requiring automatic image orientation correction.