d2phap / ImageGlass

🏞 A lightweight, versatile image viewer
https://imageglass.org
Other
7.05k stars 474 forks source link

Why MAX_IMAGE_DIMENSION = 16384 ? #1916

Closed Charltsing closed 1 month ago

Charltsing commented 1 month ago

Why MAX_IMAGE_DIMENSION = 16384 ?

Are there any restrictions on image size for DitrctN ? if i set MAX_IMAGE_DIMENSION = 65536 and open an image with a height of 20000 pixels, DXHelper.ToD2D1Bitmap report error

HResult=0x80004005 Message=Parameter error Source=DirectNStandard StackTrace: 在 DirectN.HRESULT.ThrowOnErrorExcept(IEnumerable1 exceptedValues, Boolean throwOnError) 在 DirectN.HRESULT.ThrowOnError(Boolean throwOnError) 在 DirectN.ID2D1DeviceContextExtensions.CreateBitmapFromWicBitmap[T](ID2D1DeviceContext context, IWICBitmapSource source, Nullable1 properties) 在 DirectN.ID2D1DeviceContextExtensions.CreateBitmapFromWicBitmap(IComObject1 context, IComObject1 source, Nullable1 properties) 在 D2Phap.DXHelper.ToD2D1Bitmap(IComObject1 dc, WicBitmapSource wicSrc, Nullable`1 bitmapProps)

Does DirectN not support large images? How to open a large image with UseHardwareAcceleration ?