=== Pixlio – Image Editor ===
Contributors: ikedajapn
Tags: image editor, media library, crop, image, photo
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Edit images directly in WordPress with layers, text, crop, resize, adjustments and PNG/JPEG export.

== Description ==

= Edit images directly in WordPress =

Pixlio – Image Editor adds a dedicated image-editing workspace to your WordPress administration. Browse images from your Media Library or open a file from your computer, edit it in your browser, and save a new copy to WordPress or download it.

Image pixels are processed locally in your browser. No external AI service, API key, separate account or paid image-processing service is required.

= Image editing tools =

* Crop, resize and rotate images.
* Add and edit text on the canvas.
* Adjust brightness, contrast and saturation.
* Apply monochrome, warm and vivid presets.
* Undo and redo up to 30 operations (fewer for large bitmap histories to reduce memory use).

= Layers and composition =

Combine images and text using editable layers. Change layer order, visibility, position and opacity, or merge visible layers when you need more room for your composition.

Layers and undo history are available during the current editing session. Saving as PNG or JPEG produces a flattened image; editable project files and cross-session layer restoration are not included.

= WordPress Media Library integration =

Browse, search and sort your WordPress images, and view images saved from Pixlio separately. You can also open an image from your computer.

Save an edited image as a new WordPress media attachment or download it to your device. The original image is not overwritten.

= Supported formats =

* Input: PNG, JPEG, WebP and GIF.
* Output: PNG and JPEG only.

Animated GIFs are flattened to a single still frame. Transparent areas become white when exporting to JPEG.

= Languages and appearance =

Pixlio includes Japanese, English, Simplified Chinese, Korean and Spanish interfaces, plus light and dark themes.

Use automatic WordPress site-language detection or select a language manually in Settings. WordPress gettext language packs are supported, with bundled translations as a fallback. You can also configure the default save format, JPEG quality and initial theme.

= Usage limits and important notes =

* Maximum image dimensions: 8192 pixels per side and 24 megapixels.
* Maximum source/output file size: 20 MB, or the lower WordPress upload limit where applicable.
* A capable desktop browser is recommended for large images and many layers.
* Cloud-only/offloaded media without a local source file are not supported.
* Non-proportional canvas resizing keeps the text's aspect ratio; adjust text size afterward if needed.
* No layer-preserving project save, background-removal tool, brush, PSD support or WebP export is included.
* Unsaved-change warnings do not provide recovery after a browser crash or forced shutdown.
* Saving to WordPress requires a compatible image-processing environment such as GD or Imagick.

= Privacy =

Image pixels are edited in your browser. Opening and saving WordPress media uses your own website and its configured media URLs. Pixlio includes no telemetry, external scripts, external fonts or external AI processing service.

= 日本語：WordPressで画像編集をもっと手軽に =

Pixlio – Image Editorは、WordPressの管理画面で画像を編集・加工できる無料プラグインです。

メディアライブラリの画像やパソコンから読み込んだ画像を、ブラウザ上で編集できます。編集後はWordPressに新しい画像として保存するか、パソコンにダウンロードできます。

画像の加工はブラウザ内で行います。外部AIサービスやAPIキー、別アカウント、有料の画像処理サービスは必要ありません。

= 主な画像編集機能 =

* トリミング、リサイズ、回転
* 文字の追加・編集
* 明るさ、コントラスト、彩度の調整
* モノクロ・暖色・鮮やかさのプリセット
* 最大30操作の元に戻す・やり直し（大きな画像では履歴数が少なくなる場合があります）

= レイヤー編集 =

画像や文字をレイヤーとして重ね、表示順序・表示／非表示・位置・不透明度を調整できます。必要に応じて表示中のレイヤーを統合することもできます。

レイヤーや編集履歴は現在の編集セッション中のみ保持されます。PNG/JPEGで保存した画像は統合済みとなり、レイヤーを保持したプロジェクト保存や次回起動時の復元には対応していません。

= メディアライブラリとの連携 =

WordPress内の画像を一覧表示し、検索・並び替え・選択ができます。Pixlioで保存した画像を分けて表示することも可能です。

編集した画像はWordPressのメディアライブラリに新規保存するか、パソコンにダウンロードできます。元画像は上書きしません。

= 対応画像形式 =

* 読み込み：PNG / JPEG / WebP / GIF
* 保存・書き出し：PNG / JPEGのみ

アニメーションGIFは静止画として読み込まれます。JPEGで保存した場合、透明部分は白色になります。

= 多言語・外観設定 =

日本語・英語・中国語（簡体字）・韓国語・スペイン語の表示に対応しています。WordPressのサイト言語に自動で合わせるか、設定画面で表示言語を手動選択できます。未対応言語の場合は英語を使用します。

初期保存形式、JPEG画質、初期テーマ（ライト／ダーク）も設定できます。

= ご利用上の注意と制限 =

* 画像の上限は各辺8192px、2400万画素、容量20MBです。WordPress側のアップロード上限が低い場合は、その上限が適用されます。
* 大きな画像や多数のレイヤーでは動作が重くなる場合があります。必要に応じてレイヤーを統合してください。
* レイヤー数に固定の上限はありませんが、実際の処理能力はブラウザや端末のメモリに依存します。
* 色調補正は50%が元画像、100%が最大補正です。
* レイヤーを維持したプロジェクト保存、背景透過ツール、ブラシ、PSD、WebP書き出しには対応していません。
* 未保存の状態で画面を離れる際には確認しますが、ブラウザの強制終了からの自動復元はありません。
* クラウド上にしか元ファイルがないメディアには対応していません。
* WordPressへの保存には、GDまたはImagickなどの対応した画像処理環境が必要です。

= プライバシーについて =

画像の加工処理はブラウザ内で行います。画像の読み込み・保存には、ご利用中のWordPressサイトとそのメディアURLを使用します。外部AI処理サービス、テレメトリー、外部スクリプト、外部フォントは使用しません。

== Installation ==

1. In WordPress, go to Plugins > Add New > Upload Plugin and select the Pixlio – Image Editor ZIP file, or install it from the WordPress Plugin Directory.
2. Activate Pixlio – Image Editor.
3. Open Pixlio – Image Editor from the WordPress administration menu.
4. Select a Media Library image, open a local file, or create a blank canvas.
5. Edit the image, then save a new copy to WordPress or download it as PNG/JPEG.

The `upload_files` capability is required. Editing existing media also requires the `edit_post` capability for the attachment. Saving to WordPress requires compatible GD or Imagick image processing for the chosen format.

== Frequently Asked Questions ==

= Is the original image changed? =

No. Saving creates a new WordPress media attachment. Existing images and posts remain unchanged.

= Are layers kept after saving? =

No. PNG and JPEG contain a flattened result. Editable layers and undo history are available only during the current editing session.

= Is there a layer-count limit? =

There is no fixed layer-count limit. Practical capacity depends on available browser memory and device performance. Large compositions may be slow; merge layers when appropriate.

= Does Pixlio contact a third-party service? =

No external image-processing service is used. Media URLs may use your website's existing CDN configuration.

= Is Pixlio equivalent to a professional desktop editor? =

No. Pixlio focuses on practical editing within WordPress. PSD, masks, advanced selections, blend modes and project persistence are not included.

== Screenshots ==

1. Pixlio image-editing workspace: crop, resize, rotate, add text, work with layers and adjust images. / Pixlioの画像編集画面：トリミング、リサイズ、回転、文字入れ、レイヤー、色調補正。
2. Media workspace: browse, search and select WordPress images for editing. / メディア管理画面：WordPressの画像を一覧・検索・選択して編集。
3. Settings: choose language, default PNG/JPEG format, JPEG quality and light/dark theme. / 設定画面：表示言語、PNG/JPEGの初期保存形式、JPEG画質、ライト／ダークテーマ。

== Changelog ==

= 0.1.1 =
* Improved English and Japanese readme formatting, section headings, FAQ layout and screenshot descriptions. No changes to image-editing features.

= 0.1.0 =
* Initial free release: image dashboard, layered canvas, text, crop, rotate, resize, basic adjustments, PNG/JPEG export and new-attachment saving.

== Development ==

The application source is included in `assets/engine.js`, `assets/studio-controls.js`, `assets/studio.css`, `pixlio-image-editor.php`, `settings.php` and `i18n.php`. No compilation or external dependencies are required.

The original rendering engine uses Canvas 2D. No third-party image-editor library is bundled.
