mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
22897ea389
- **Benchmark:**
- (Add) PNG, GZip, Deflate and LZ4 compress tests
- (Change) Test against a known image instead of random noise
- (Change) Single-thread tests from 100 to 200 and multi-thread tests from 1000 to 5000
- (Improvement) Same image instance is shared between tests instead of create new per test
- (Fix) Encode typo
- **Core:**
- (Add) Layer compression method: Allow to choose the compression method for layer image
- **PNG:** Compression=High Speed=Slow (Use with low RAM)
- **GZip:** Compression=Medium Speed=Medium (Optimal)
- **Deflate:** Compression=Medium Speed=Medium (Optimal)
- **LZ4:** Compression=Low Speed=Fast (Use with high RAM)
- (Improvement) Better handling on cancel operations and more immediate response
- (Fix) Extract: Zip Slip Vulnerability (CWE-22)
- **File formats:**
- (Improvement) Better handling of encode/decoding layers from zip files
- (Fix) ZCode: Canceling the file load can trigger an error
- (Fix) VDA: Unable to open vda zip files
- **Tools:**
- (Improvement) Allow operations to be aware of ROI and Masks before execution (#436)
- (Improvement) Scripting: Allow save and load profiles (#436)
- (Fix) Adjust layer height: When using the Offset type the last layer in the range was not taken in account (#435)
- **UI:**
- (Improvement) Allow layer zoom levels of 0.1x and 64x but constrain minimum zoom to the level of image fit
- (Improvement) Update change log now shows with markdown style and more readable
- (Fix) Windows MSI upgrade to this version (#432)
- (Fix) Auto-updater for Mac ARM, was downloading x64 instead
40 lines
1.7 KiB
C#
40 lines
1.7 KiB
C#
/*
|
|
* GNU AFFERO GENERAL PUBLIC LICENSE
|
|
* Version 3, 19 November 2007
|
|
* Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
namespace UVtools.WPF;
|
|
|
|
public static class AppSettings
|
|
{
|
|
// Supported ZoomLevels for Layer Preview.
|
|
// These settings eliminate very small zoom factors from the ImageBox default values,
|
|
// while ensuring that 4K/5K build plates can still easily fit on screen.
|
|
public static readonly int[] ZoomLevels =
|
|
{10, 20, 25, 30, 50, 75, 100, 150, 200, 300, 400, 500, 600, 700, 800, 1200, 1600, 3200, 6400};
|
|
|
|
// Count of the bottom portion of the full zoom range which will be skipped for
|
|
// assignable actions such as auto-zoom level, and crosshair fade level. If values
|
|
// are added/removed from ZoomLevels above, this value may also need to be adjusted.
|
|
public const byte ZoomLevelSkipCount = 8; // Start at 2x which is index 8.
|
|
|
|
/// <summary>
|
|
/// Returns the zoom level at which the crosshairs will fade and no longer be displayed
|
|
/// </summary>
|
|
public static int CrosshairFadeLevel => ZoomLevels[UserSettings.Instance.LayerPreview.CrosshairFadeLevelIndex + ZoomLevelSkipCount];
|
|
|
|
/// <summary>
|
|
/// Returns the zoom level that will be used for autozoom actions
|
|
/// </summary>
|
|
public static int LockedZoomLevel => ZoomLevels[UserSettings.Instance.LayerPreview.ZoomLockLevelIndex + ZoomLevelSkipCount];
|
|
|
|
|
|
/// <summary>
|
|
/// Minimum Zoom level to which autozoom can be locked.
|
|
/// </summary>
|
|
public const byte MinLockedZoomLevel = 200;
|
|
|
|
|
|
} |