NAME
Display::Resolution - Convert between display resolution size (e.g. 1280x720) and name (e.g. HD, 720p)
VERSION
This document describes version 0.001 of Display::Resolution (from Perl distribution Display-Resolution), released on 2016-10-07.
FUNCTIONS
get_display_resolution_name(%args) -> any
Get the known name for a display resolution size.
Examples:
You can specify width and height ...:
get_display_resolution_name(height => 480, width => 640); # -> "SD"
... or size directly (in "x x y" or "x*y" format):
get_display_resolution_name(size => "1280x720"); # -> "720p"
Return all names:
get_display_resolution_name(size => "1280x720", all => 1); # -> ["720p", "HD", "WXGA 16:9"]
Unknown resolution size:
get_display_resolution_name(size => "999x666"); # -> undef
Will return undef if there is no known name for the resolution size.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
all => bool
Return all names instead of the first one.
When set to true, an arrayref will be returned instead of string.
height => posint
size => str
width => posint
Return value: (any)
get_display_resolution_size(%args) -> any
Get the size of a display resolution name.
Examples:
Example #1:
get_display_resolution_size(name => "VGA"); # -> "640x480"
Unknown name:
get_display_resolution_size(name => "foo"); # -> undef
Will return undef if the name is unknown.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
name* => str
Return value: (any)
list_display_resolution_names() -> any
Examples:
Example #1:
list_display_resolution_names();
Result:
{ "1080p" => "1920x1080", "1440p" => "2560x1440", "16K" => "15360x8640", "16K UHD" => "15360x8640", "480p" => "720x480", "4K" => "3840x2160", "4K UHD" => "3840x2160", "576p" => "720x576", "5K" => "5120x2880", "720p" => "1280x720", "8K" => "7680x4320", "8K UHD" => "7680x4320", "Cinema 2K" => "2048x1080", "Cinema 4K" => "4096x2160", "DCI 2K" => "2048x1080", "DCI 4K" => "4096x2160", "DGA" => "960x640", "FHD" => "1920x1080", "Full HD" => "1920x1080", "FWVGA" => "854x480", "HD" => "1280x720", "HD+" => "1600x900", "HQVGA" => "240x160", "HVGA" => "480x320", "qHD" => "960x540", "QHD" => "2560x1440", "QHD+" => "3200x1800", "QQVGA" => "160x120", "qqVGA" => "160x120", "QVGA" => "320x240", "SD" => "640x480", "SVGA" => "800x600", "SXGA" => "1280x1024", "UHD 16K" => "15360x8640", "UHD 4K" => "3840x2160", "UHD 8K" => "7680x4320", "UHD+" => "5120x2880", "UHDTV-1" => "3840x2160", "UHDTV-2" => "7680x4320", "UVGA" => "800x600", "UWQHD" => "3440x1440", "UXGA" => "1600x1200", "VGA" => "640x480", "WGA" => "768x480", "WQHD" => "2560x1440", "WQVGA" => "400x240", "WQXGA" => "2560x1600", "WQXGA+" => "3200x1800", "WSVGA" => "1024x600", "WUXGA" => "1920x1200", "WVGA" => "768x480", "WXGA 16:10" => "1280x800", "WXGA 16:9" => "1280x720", "WXGA 5:3" => "1280x768", "WXGA+" => "1440x900", "XGA" => "1024x768", "XGA+" => "1152x864", }
This function is not exported by default, but exportable.
No arguments.
Return value: (any)
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Display-Resolution.
SOURCE
Source repository is at https://github.com/perlancar/perl-Display-Resolution.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Display-Resolution
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.