Resources/PixelVaultPresets.psd1

<#
    Celerium.PixelVault presets
 
    This data file holds every size preset, display profile, card type, and
    portable application source that the module uses. Nothing in the
    function bodies is hardcoded, so adding a device or a size only needs a
    new entry here.
 
    To use your own copy without editing the module, point the
    PIXELVAULT_PRESET_PATH environment variable at a file with the same layout.
 
    Widths and heights of displays are stored in PORTRAIT orientation, the
    -Orientation Landscape parameter swaps them.
#>

@{

    SchemaVersion       = 1

    # Used when -Display, -Size, or -CardType are not given
    DefaultDisplay      = 'Nexus7-2013'
    DefaultSize         = 'Medium'
    DefaultCardType     = 'Standard'

    # File types that are scanned when a folder is given
    SupportedExtensions = @('.png', '.gif', '.webp', '.jpg', '.jpeg', '.bmp', '.tif', '.tiff')

    # Folders with these names are never scanned, so converted output is not processed again
    ExcludedFolderNames = @('converted')

    # Physical card sizes, used for the card aspect ratio and the rounded corner radius
    # Card sizes - https://www.makesnapshots.com/trading-card-sizes
    # - https://tcgcompanion.app/blog/pokemon-card-size/
    # CornerRadiusMm is not given by the references, 3 mm is a common value & can be changed here
    CardTypes           = @{
        Standard = @{ Description = 'Pokemon, Magic: The Gathering (63 x 88 mm)'; WidthMm = 63;   HeightMm = 88;   CornerRadiusMm = 3.0 }
        YuGiOh   = @{ Description = 'Yu-Gi-Oh! (59 x 86 mm)';                     WidthMm = 59;   HeightMm = 86;   CornerRadiusMm = 3.0 }
        Sports   = @{ Description = 'Standard sports card (2.5 x 3.5 in)';        WidthMm = 63.5; HeightMm = 88.9; CornerRadiusMm = 3.0 }
    }

    # Each size is a scale of the native resolution of the selected display profile
    SizePresets         = @(
        @{ Name = 'Small';      Scale = 0.25; Description = 'Thumbnails & previews' }
        @{ Name = 'Medium';     Scale = 0.50; Description = 'General display, ~300 DPI for the Card profile' }
        @{ Name = 'Large';      Scale = 0.75; Description = 'Large display, ~450 DPI for the Card profile' }
        @{ Name = 'ExtraLarge'; Scale = 1.00; Description = 'Native display resolution, ~600 DPI for the Card profile' }
    )

    # Display device profiles (portrait). MarginPercent is the transparent space kept on each side of the card
    Displays            = @(
        @{
            Name          = 'Nexus7-2013'
            Description   = 'Asus Google Nexus 7 (2013)'
            Width         = 1200
            Height        = 1920
            DiagonalInch  = 7.0
            Ppi           = 323
            AspectRatio   = '16:10'
            MarginPercent = 4
            Source        = 'https://www.gsmarena.com/asus_google_nexus_7_(2013)-5600.php'
        }
        @{
            Name          = 'Card'
            Description   = 'Archival canvas that matches the card aspect ratio (no padding)'
            UseCardAspect = $true
            Height        = 2112
            MarginPercent = 0
            Source        = 'https://www.makesnapshots.com/trading-card-sizes'
        }
        @{
            Name          = 'iPad-11-A16'
            Description   = 'Apple iPad 11-inch (A16)'
            Width         = 1640
            Height        = 2360
            DiagonalInch  = 10.86
            Ppi           = 264
            AspectRatio   = '1.44:1'
            MarginPercent = 4
            Source        = 'https://www.apple.com/ipad-11/specs/'
        }
        @{
            Name          = 'GalaxyTabS9'
            Description   = 'Samsung Galaxy Tab S9'
            Width         = 1600
            Height        = 2560
            DiagonalInch  = 11.0
            Ppi           = 274
            AspectRatio   = '16:10'
            MarginPercent = 4
            Source        = 'https://en.wikipedia.org/wiki/Samsung_Galaxy_Tab_S9'
        }
        @{ Name = 'FHD'; Description = 'Full HD 1080p (16:9)'; Width = 1080; Height = 1920; AspectRatio = '16:9'; MarginPercent = 4 }
        @{ Name = 'QHD'; Description = 'Quad HD 1440p (16:9)'; Width = 1440; Height = 2560; AspectRatio = '16:9'; MarginPercent = 4 }
        @{ Name = 'UHD'; Description = '4K UHD 2160p (16:9)';  Width = 2160; Height = 3840; AspectRatio = '16:9'; MarginPercent = 4 }
    )

    # Common ratios reported by Get-PixelVaultAspectRatio as the nearest standard (short side : long side)
    StandardRatios      = @(
        @{ Name = 'Square';      Short = 1;  Long = 1 }
        @{ Name = '4:5';         Short = 4;  Long = 5 }
        @{ Name = '3:4';         Short = 3;  Long = 4 }
        @{ Name = '5:7';         Short = 5;  Long = 7 }
        @{ Name = '2:3';         Short = 2;  Long = 3 }
        @{ Name = '10:16';       Short = 10; Long = 16 }
        @{ Name = '9:16';        Short = 9;  Long = 16 }
    )

    # Portable application sources (64-bit Windows x64 builds only)
    # Assets - regex per platform key, the named group 'Version' holds the version text
    Applications        = @{

        ImageMagick = @{
            Description      = 'Create, edit, convert, and manipulate images'
            ExecutableName   = 'magick'
            Required         = $true
            VersionArguments = @('-version')
            VersionPattern   = 'Version:\s*ImageMagick\s+(?<Version>\d+\.\d+\.\d+-\d+)'
            ReleaseType      = 'GitHub'
            Repository       = 'ImageMagick/ImageMagick'
            Assets           = @{
                'windows-x64'   = '^ImageMagick-(?<Version>\d+\.\d+\.\d+-\d+)-portable-Q16-HDRI-x64\.7z$'
            }
            Links            = @('https://imagemagick.org/command-line-processing/', 'https://github.com/ImageMagick/ImageMagick')
        }

        OxiPNG = @{
            Description      = 'Multithreaded lossless PNG/APNG compression optimizer'
            ExecutableName   = 'oxipng'
            Required         = $true
            VersionArguments = @('--version')
            VersionPattern   = 'oxipng\s+(?<Version>\d+(?:\.\d+)+)'
            ReleaseType      = 'GitHub'
            Repository       = 'oxipng/oxipng'
            Assets           = @{
                'windows-x64'   = '^oxipng-(?<Version>\d+(?:\.\d+)+)-x86_64-pc-windows-msvc\.zip$'
            }
            Links            = @('https://github.com/oxipng/oxipng')
        }

        Gifsicle = @{
            Description      = 'Create, edit, and inspect GIF images and animations'
            ExecutableName   = 'gifsicle'
            # Only needed for GIF output, ImageMagick is used when it is not installed
            Required         = $false
            VersionArguments = @('--version')
            VersionPattern   = 'Gifsicle\s+(?<Version>\d+(?:\.\d+)+)'
            ReleaseType      = 'HtmlIndex'
            Url              = 'https://eternallybored.org/misc/gifsicle/'
            Assets           = @{
                'windows-x64'   = '^gifsicle-(?<Version>\d+(?:\.\d+)+)-win64\.zip$'
            }
            Links            = @('https://github.com/kohler/gifsicle', 'https://www.lcdf.org/gifsicle/')
        }

    }

}