RasterImage.HorizontalResolution and RasterImage.VerticalResolution has different values on Windows and Linux. You can check it using following code and image attached, on Windows both resolutions equal 96, but on Linux its 198.12. It occurs on Aspose.Imaging 25.3.0
using System.Runtime.InteropServices;
using Aspose.Imaging;
using Image = Aspose.Imaging.Image;
var filename = Path.GetFullPath(@"./NoDpi1.jpg");
Console.WriteLine(RuntimeInformation.OSDescription);
var source = (RasterImage)Image.Load(filename);
Console.WriteLine("SOURCE HORIZONTAL - " + source.HorizontalResolution);
Console.WriteLine("SOURCE VERTICAL - " + source.VerticalResolution);
NoDpi1.jpg (464.6 KB)
There is also another image using which we can reproduse this behaviour, but unfortunately iam unable to provide it for testing. But its also a jpeg and its Raster Image on older versions of Aspose.Imaging used to show resolution of 1, but after update its 96 on Windows and 72 on Linux.