=== Kogility Image Editor for WooCommerce ===
Contributors: kogility
Tags: image editor, woocommerce, media library, product images, canvas
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Edit, crop, resize, and filter product images directly in your WordPress dashboard.

== Description ==

**Kogility Image Editor for WooCommerce** integrates a modern image studio directly into your WordPress Media Library and WooCommerce product screens.

Stop downloading images, editing them in Photoshop, and re-uploading. With Kogility Image Editor, you can adjust, fine-tune, filter, resize, crop, rotate, flip, draw, add text, select/cut, and watermark your product images — all without leaving WordPress.

= Free Features =

* **Adjust** — Brightness, Contrast, Exposure, Saturation, Warmth, and Blur with 9 instant presets
* **Crop & Transform** — Interactive crop with freeform and aspect presets (1:1, 4:5, 16:9), 90° rotation, and flipping
* **Draw & Shapes** — Pencil, Pen, Brush, Airbrush, Eraser, and geometric shapes with mouse, stylus, and touch support
* **Selection Marquee** — Box and Circle marquee selection with Copy to Layer and Cut to Layer
* **History Stack** — 35-step Undo / Redo with Ctrl+Z / Ctrl+Y shortcuts
* **Format Conversion** — Save as JPG, PNG, or WebP
* **Overwrite Original** — Replace the original file while keeping the same attachment ID (no broken gallery links)
* **Smart Integration** — Kogility Studio buttons appear in Media Library, WooCommerce product pages, variable product variations, and the Gutenberg editor
* **Media Filter** — Filter your Media Library by file type, date, and dimensions

= Pro Features =

* **Canvas Framing & Scaling** — Pad images to perfect aspect ratios (1:1, 4:5, 4:3, 16:9, 9:16) with custom pixel dimensions, image scaling slider, padding slider, and auto-centering.
* **Image & Watermark Layers** — Access the entire WordPress Media Library or upload brand assets, logos, and badges with custom folder organization.
* **Text Overlays & 30+ Fonts** — Add custom styled typography with curated Google Fonts and drop shadow.
* **Layer System** — Visual drag-and-drop layer reordering, duplicate layer, save layer to presets, opacity control, lock, and visibility toggles.

== Source & build ==

Unminified JavaScript for this plugin ships in the plugin folder:

* `assets/js/admin.js` builds to `assets/dist/admin.js`
* `assets/js/media-modal.js` builds to `assets/dist/media-modal.js`
* `assets/js/gutenberg.js` builds to `assets/dist/gutenberg.js`
* `assets/js/studio.js` is loaded as-is (not minified)
* `assets/js/media-filter.js` and `assets/js/presets-admin.js` are loaded as-is

Rebuild the dist files from the plugin root with Node.js:

    npm install
    npm run build

That runs esbuild via `package.json` and `build.mjs`.

Third-party: Freemius WordPress SDK (`vendor/freemius/`, https://github.com/Freemius/wordpress-sdk).

== Changelog ==

= 1.2.8 =
* Fix: Canvas ratio defaults to Original Size instead of gated 1:1

= 1.2.7 =
* Fix: Enqueue Media Library filter and presets dashboard scripts instead of inline tags
* Fix: Verify saved image bytes match a real JPEG, PNG, GIF, or WebP before writing uploads
* Compatibility: WooCommerce remains optional — product hooks load only when it is active

= 1.2.6 =
* Fix: Prefix the main plugin class as WCIE_Image_Editor for WordPress.org Plugin Check

= 1.2.5 =
* Fix: Lasso, rectangle, and ellipse Cut now punches a hole in the original layer
* Compatibility: Tested up to WordPress 7.1

= 1.2.4 =
* Fix: Fill colour and Fill Shape only appear on the Shapes bar
* Fix: Lasso hint wraps to two lines; Copy, Cut, Clear, and Deselect sit on the right after a selection

= 1.2.3 =
* Fix: Product, gallery, and variation thumbnails update immediately after save
* Fix: Media Library preview refreshes after overwrite without a page reload
* Fix: Reopening Studio after overwrite no longer shows a blank canvas

= 1.2.2 =
* Feature: Pixlr-style tool rail with a contextual options bar for every tool
* Feature: Eight paint-brush heads (Soft, Hard, Airbrush, Marker, Calligraphy, Spray, Glow, Chalk) in a popout picker
* Feature: Keyboard shortcuts (tools, undo/redo, save, zoom) and scroll-wheel zoom
* Feature: Magic wand with Shift-add / Alt-subtract, plus lasso, marquee, and eyedropper
* Feature: Text wrapping, format/styles popouts, and predictable 32px default type size
* Feature: Image presets popout with folder chips and drag-and-drop filing
* Fix: Saving an edited image no longer trips the browser "leave page" warning
* Fix: Crop, canvas dimensions, and text-box editing now apply as shown on screen

= 1.1.15 =
* Fix: Resolved crop grid line and guideline artifacting by ensuring clean export pass during crop application.
* Feature: Added dynamic visual sizing circle indicator for Eraser, Pencil, Pen, Brush, and Airbrush tools.
* Update: Updated Pro feature upgrade video preview.

= 1.1.14 =
* Feature: Added unified interactive Kogility Studio engine with complete layer stack.
* Feature: Added Free Draw & Shapes tab (Pencil, Pen, Brush, Airbrush, Eraser, Rectangle, Circle, Line, Arrow).
* Feature: Added Shape Selection Marquee tool with Cut to Layer and Copy to Layer.
* Feature: Integrated native WordPress Media Library picker directly into Studio.
* Feature: Added 30+ curated Google Fonts for Text Overlay.
* Feature: Added Layer Duplicate and Save Layer as Preset capabilities.
* Feature: Added Kogility Studio button support for WooCommerce Variable Products.
* Feature: Added dedicated Kogility Studio Presets admin dashboard page.
* Fix: Improved Media Modal stacking order and close button responsiveness.

= 1.1.13 =
* Fix: Prevented fatal errors on Premium version activation by wrapping class declarations.
* Fix: Improved Upgrade link fallback mechanism for users who opt-out of Freemius tracking.

= 1.1.12 =
* Minor version bump to sync with Freemius release

= 1.1.11 =
* Renamed plugin to Kogility Image Editor for WooCommerce
* Added Pro features YouTube video to upgrade cards
* Updated Freemius integration

= 1.1.10 =
* Improved Canvas Fit toolbar layout — cleaner two-row design
* Added full canvas reset button (restores scale, rotation, and position)
* Moved Grid toggle and Ratio selector for better usability

= 1.1.9 =
* Reorganized Canvas Fit toolbar layout
* Added reset icon (rotating arrow) for quick canvas reset

= 1.1.8 =
* Added rotation tool to Canvas Fit (rotate images -180° to 180°)
* Two-row toolbar layout in Canvas Fit

= 1.1.6 =
* Added visual loading feedback during save operations
* Fixed Gutenberg integration (resolved grey screen issue)
* Added "Overwrite original" checkbox to Canvas Fit
* Version bump for cache busting on live servers

= 1.1.0 =
* Added Canvas Fit tool with drag-to-position, scale, grid overlay, and background color picker
* Added "Overwrite original" feature — replaces files in place while preserving attachment IDs
* Added format selection (JPG, PNG, WebP) to Canvas Fit
* Integrated edit buttons into WooCommerce product pages and Gutenberg editor

= 1.0.0 =
* Initial release
* Filerobot Image Editor integration (Adjust, Finetune, Filters, Resize, Crop, Rotate, Flip)
* Media Library and WooCommerce product page support
* Media filter for file type, date, and dimensions

== Upgrade Notice ==

= 1.1.11 =
Renamed plugin and added Pro features video previews to upgrade cards.
