feat(application): PSD layer separation and image quality/count threading
Convert GPT Image 2 layered PSD output into canvas image/text nodes with a local separation fallback (new layer_separation.go, oov/psd dependency), default layer-separation/edit-elements output_format to psd, and thread imageQuality/imageCount through project generation and job processing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -268,6 +268,7 @@ func normalizeMoveObjectInput(input design.GeneratorTaskInputArgs) design.Genera
|
||||
input.DstBox = &box
|
||||
}
|
||||
input.ImageURL = strings.TrimSpace(input.ImageURL)
|
||||
input.OutputFormat = strings.TrimSpace(input.OutputFormat)
|
||||
input.Prompt = strings.TrimSpace(input.Prompt)
|
||||
input.Resolution = strings.TrimSpace(input.Resolution)
|
||||
input.AspectRatio = strings.TrimSpace(input.AspectRatio)
|
||||
@@ -279,6 +280,10 @@ func normalizeLayerSeparationInput(input design.GeneratorTaskInputArgs) design.G
|
||||
input.ImageURL = strings.TrimSpace(input.Image[0])
|
||||
}
|
||||
input.ImageURL = strings.TrimSpace(input.ImageURL)
|
||||
input.OutputFormat = strings.TrimSpace(input.OutputFormat)
|
||||
if input.OutputFormat == "" {
|
||||
input.OutputFormat = "psd"
|
||||
}
|
||||
input.Prompt = strings.TrimSpace(input.Prompt)
|
||||
input.Resolution = strings.TrimSpace(input.Resolution)
|
||||
input.AspectRatio = strings.TrimSpace(input.AspectRatio)
|
||||
@@ -777,15 +782,19 @@ func generatorTaskInputArgsForNodeAction(target design.Node, req design.NodeActi
|
||||
}
|
||||
width, height := design.GeneratedImageDimensions(imageSize)
|
||||
input := design.GeneratorTaskInputArgs{
|
||||
AspectRatio: aspectRatioLabel(int64(math.Round(width)), int64(math.Round(height))),
|
||||
Image: []string{target.Content},
|
||||
ImageURL: target.Content,
|
||||
Prompt: generatorTaskPromptForNodeAction(req),
|
||||
Resolution: resolutionLabel(imageSize),
|
||||
AspectRatio: aspectRatioLabel(int64(math.Round(width)), int64(math.Round(height))),
|
||||
Image: []string{target.Content},
|
||||
ImageURL: target.Content,
|
||||
OutputFormat: strings.TrimSpace(req.Options["output_format"]),
|
||||
Prompt: generatorTaskPromptForNodeAction(req),
|
||||
Resolution: resolutionLabel(imageSize),
|
||||
}
|
||||
if normalizeNodeAction(req.Action) == "move-object" {
|
||||
input.SrcBox, input.DstBox = moveObjectBoxesFromSelection(req.Selection)
|
||||
}
|
||||
if normalizeNodeAction(req.Action) == "edit-elements" && input.OutputFormat == "" {
|
||||
input.OutputFormat = "psd"
|
||||
}
|
||||
return input
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user