opencode-gpt-imagegen 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -129,16 +129,26 @@ Ask for a transparent background, and the agent passes `background: "transparent
|
|
|
129
129
|
|
|
130
130
|
### Sizes
|
|
131
131
|
|
|
132
|
-
`gpt_imagegen`
|
|
132
|
+
`gpt_imagegen` accepts these seven sizes:
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
- `1254x1254` (1:1)
|
|
135
|
+
- `1536x1024` (3:2)
|
|
136
|
+
- `1024x1536` (2:3)
|
|
137
|
+
- `1448x1086` (4:3)
|
|
138
|
+
- `1086x1448` (3:4)
|
|
139
|
+
- `1672x941` (16:9)
|
|
140
|
+
- `941x1672` (9:16)
|
|
135
141
|
|
|
136
|
-
|
|
142
|
+
The tool adds the requested dimensions and aspect ratio to the prompt. In our tests with newly generated images ([#107](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/issues/107#issuecomment-6020015062)), the output closely matched the requested aspect ratio and was about 1.57 megapixels. For example, asking for `2048x1152` in the prompt produced a `1672x941` image at roughly 16:9.
|
|
143
|
+
|
|
144
|
+
The tool reports the dimensions of the saved image. If you need exact dimensions, generate at the closest aspect ratio, then resize or crop the image with a tool such as ImageMagick.
|
|
137
145
|
|
|
138
146
|
## How it works
|
|
139
147
|
|
|
140
148
|
This plugin calls the image generation endpoints of the OpenAI Codex backend (`images/generations`, or `images/edits` when reference images are given), the same endpoints the Codex CLI uses, and writes the returned PNG to disk. V1 reads `OPENCODE_AUTH_CONTENT` first, then OpenCode's `auth.json`. V2 resolves the active OpenAI connection through OpenCode's integration API.
|
|
141
149
|
|
|
150
|
+
With Codex OAuth, this plugin has the same limits as the Codex CLI's built-in image generation. The backend chooses the model and quality, so the request's `model` and `quality` fields cannot override them. The request's `size` field does not let you set exact pixel dimensions either.
|
|
151
|
+
|
|
142
152
|
## Contributing
|
|
143
153
|
|
|
144
154
|
Small bug fixes are welcome as direct pull requests. For features, refactors, or behavior changes, please open an issue first. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-gpt-imagegen",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "OpenCode plugin for GPT Image 2 generation through your ChatGPT subscription, with reference images and safe PNG output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@biomejs/biome": "^2.6.8",
|
|
62
62
|
"@opencode-ai/plugin": "^1.19.6",
|
|
63
|
-
"@opencode/plugin": "^2.
|
|
63
|
+
"@opencode/plugin": "^2.4.1",
|
|
64
64
|
"@tsconfig/node22": "^22.0.7",
|
|
65
65
|
"@types/bun": "^1.4.5",
|
|
66
66
|
"typescript": "^7.0.2"
|