Fix exif info display resolution orientation
This commit is contained in:
@@ -383,11 +383,11 @@ function formatDate (iso: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
function formatBytes (bytes: number): string {
|
||||
export function formatBytes (bytes: number): string {
|
||||
if (bytes < 1024) return bytes + ' B'
|
||||
const kb = bytes / 1024
|
||||
if (kb < 1024) return kb.toFixed(1) + ' KB'
|
||||
if (kb < 1024) return kb.toFixed(1) + ' KiB'
|
||||
const mb = kb / 1024
|
||||
if (mb < 1024) return mb.toFixed(1) + ' MB'
|
||||
return (mb / 1024).toFixed(2) + ' GB'
|
||||
if (mb < 1024) return mb.toFixed(1) + ' MiB'
|
||||
return (mb / 1024).toFixed(2) + ' GiB'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user