Reorganize some settings
This commit is contained in:
parent
730bd378ea
commit
d16271345d
2 changed files with 70 additions and 67 deletions
|
|
@ -340,71 +340,6 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Alignment Section -->
|
|
||||||
<div class="setting-section">
|
|
||||||
<div class="section-header">
|
|
||||||
<span class="section-title">Final Image Composition</span>
|
|
||||||
</div>
|
|
||||||
<div class="setting-row sub-setting">
|
|
||||||
<label for="eye-distance">
|
|
||||||
<span class="setting-label">Eye Distance</span>
|
|
||||||
<span class="setting-hint">Distance between eyes as % of image width (larger = zoom in)</span>
|
|
||||||
</label>
|
|
||||||
<div class="setting-control-with-visual">
|
|
||||||
<input
|
|
||||||
id="eye-distance"
|
|
||||||
type="range"
|
|
||||||
bind:value={config.processing.alignment.eye_distance}
|
|
||||||
min="0.1"
|
|
||||||
max="0.5"
|
|
||||||
step="0.01"
|
|
||||||
/>
|
|
||||||
<span class="value">{(config.processing.alignment.eye_distance * 100).toFixed(0)}%</span>
|
|
||||||
<div class="inline-visual-indicator">
|
|
||||||
<AlignmentIndicator eyeDistance={config.processing.alignment.eye_distance} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
{:else if activeTab === 'output'}
|
|
||||||
<fieldset disabled={disabled || saving}>
|
|
||||||
<div class="setting-row">
|
|
||||||
<label for="output-size">
|
|
||||||
<span class="setting-label">Output Size</span>
|
|
||||||
<span class="setting-hint">Final image dimensions (square)</span>
|
|
||||||
</label>
|
|
||||||
<div class="setting-control">
|
|
||||||
<input
|
|
||||||
id="output-size"
|
|
||||||
type="range"
|
|
||||||
bind:value={config.processing.output.size}
|
|
||||||
min="128"
|
|
||||||
max="1024"
|
|
||||||
step="64"
|
|
||||||
/>
|
|
||||||
<span class="value">{config.processing.output.size}px</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="setting-row">
|
|
||||||
<label for="max-workers">
|
|
||||||
<span class="setting-label">Parallel Workers</span>
|
|
||||||
<span class="setting-hint">Concurrent image processing tasks</span>
|
|
||||||
</label>
|
|
||||||
<div class="setting-control">
|
|
||||||
<input
|
|
||||||
id="max-workers"
|
|
||||||
type="range"
|
|
||||||
bind:value={config.processing.max_workers}
|
|
||||||
min="1"
|
|
||||||
max="16"
|
|
||||||
step="1"
|
|
||||||
/>
|
|
||||||
<span class="value">{config.processing.max_workers}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="setting-row checkbox-row">
|
<div class="setting-row checkbox-row">
|
||||||
<label for="keep-intermediates">
|
<label for="keep-intermediates">
|
||||||
<span class="setting-label">Keep Debug Images</span>
|
<span class="setting-label">Keep Debug Images</span>
|
||||||
|
|
@ -413,6 +348,47 @@
|
||||||
<input id="keep-intermediates" type="checkbox" bind:checked={config.processing.output.keep_intermediates} />
|
<input id="keep-intermediates" type="checkbox" bind:checked={config.processing.output.keep_intermediates} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
{:else if activeTab === 'output'}
|
||||||
|
<fieldset disabled={disabled || saving}>
|
||||||
|
<div class="setting-section">
|
||||||
|
<div class="setting-row">
|
||||||
|
<label for="output-size">
|
||||||
|
<span class="setting-label">Output Size</span>
|
||||||
|
<span class="setting-hint">Final image dimensions (square)</span>
|
||||||
|
</label>
|
||||||
|
<div class="setting-control">
|
||||||
|
<input
|
||||||
|
id="output-size"
|
||||||
|
type="range"
|
||||||
|
bind:value={config.processing.output.size}
|
||||||
|
min="128"
|
||||||
|
max="1024"
|
||||||
|
step="64"
|
||||||
|
/>
|
||||||
|
<span class="value">{config.processing.output.size}px</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="setting-row">
|
||||||
|
<label for="max-workers">
|
||||||
|
<span class="setting-label">Parallel Workers</span>
|
||||||
|
<span class="setting-hint">Concurrent image processing tasks</span>
|
||||||
|
</label>
|
||||||
|
<div class="setting-control">
|
||||||
|
<input
|
||||||
|
id="max-workers"
|
||||||
|
type="range"
|
||||||
|
bind:value={config.processing.max_workers}
|
||||||
|
min="1"
|
||||||
|
max="16"
|
||||||
|
step="1"
|
||||||
|
/>
|
||||||
|
<span class="value">{config.processing.max_workers}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Time Interval Section -->
|
<!-- Time Interval Section -->
|
||||||
<div class="setting-section">
|
<div class="setting-section">
|
||||||
<div class="section-header">
|
<div class="section-header">
|
||||||
|
|
@ -500,6 +476,33 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Alignment Section -->
|
||||||
|
<div class="setting-section">
|
||||||
|
<div class="section-header">
|
||||||
|
<span class="section-title">Final Image Composition</span>
|
||||||
|
</div>
|
||||||
|
<div class="setting-row sub-setting">
|
||||||
|
<label for="eye-distance">
|
||||||
|
<span class="setting-label">Eye Distance</span>
|
||||||
|
<span class="setting-hint">Distance between eyes as % of image width (larger = zoom in)</span>
|
||||||
|
</label>
|
||||||
|
<div class="setting-control-with-visual">
|
||||||
|
<input
|
||||||
|
id="eye-distance"
|
||||||
|
type="range"
|
||||||
|
bind:value={config.processing.alignment.eye_distance}
|
||||||
|
min="0.05"
|
||||||
|
max="0.4"
|
||||||
|
step="0.01"
|
||||||
|
/>
|
||||||
|
<span class="value">{(config.processing.alignment.eye_distance * 100).toFixed(0)}%</span>
|
||||||
|
<div class="inline-visual-indicator">
|
||||||
|
<AlignmentIndicator eyeDistance={config.processing.alignment.eye_distance} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{:else if activeTab === 'video'}
|
{:else if activeTab === 'video'}
|
||||||
<fieldset disabled={disabled || saving}>
|
<fieldset disabled={disabled || saving}>
|
||||||
|
|
|
||||||
|
|
@ -371,9 +371,9 @@ impl AlignmentConfig {
|
||||||
"Alignment eye_distance must be between 0.0 and 1.0 (exclusive)".to_string(),
|
"Alignment eye_distance must be between 0.0 and 1.0 (exclusive)".to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if self.eye_distance < 0.1 || self.eye_distance > 0.5 {
|
if self.eye_distance < 0.05 || self.eye_distance > 0.4 {
|
||||||
return Err(Error::Config(
|
return Err(Error::Config(
|
||||||
"Alignment eye_distance should be between 0.1 and 0.5 for best results".to_string(),
|
"Alignment eye_distance should be between 0.05 and 0.4 for best results".to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue