Thank you for sharing the details. I have observed the issue and issue with ID IMAGINGJAVA-1309 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
This is wrong suggestion ! Already checked it before !
In this case will resize raster image after converting in PNG format.
The quality of vector image will lost if coefficient of scaling too much.
The main sense of using SVG is scaling image BEFORE it will rasterized to PNG or other format and in this case could be saved quality of image. Look into example of code in this topic please:
and it is working same way. Yes, it is working, but working wrong.
It resize image after rasterize and lost the quality of image.
But right way is resize vector image before it will rasterize !
We are sorry for your inconvenience. We are verifying it further on our end and will share feedback with you ASAP. We request for your patience in this regard.
Sorry for my perseverance !
Of course, I understand, that it is not simple to make so flexible method, which will working for all formats.
I will waiting for results and I wish luck to you.
P.S. I did not tested on versions high, than 19.4.
Tell me please, if exists a possible, that you fixed it in newer versions ?
We’ve double checked the issue and found that current implementation works well when up-scaling with scale factor 10 and more, but loses quality with smallest scale factor values. Just to ensure, that we’re on the same page, can you please share the required logo width and height. We have also added the issue with ID IMAGINGJAVA-1431 to support native Svg resize in the future releases as well.
Well, originally I have SVG image with size 165x40.
I have not possible to define factor of scale because I am using Template for Documents,
which customers creating themselves and I can retrieve only width and height.
But, usually it resizing to resolution around of 350x85 pixels.
Actually, exists a possible, that it could be resized to 650x155 pixels.
In this topic uploaded archive, which contain source code and sample of SVG image.
If I understood correctly, that vector image after load over
com.aspose.imaging.Image.load(stream);
should be resized using
com.aspose.imaging.Image.resize(width, height);
method without lost quality of image and after that converting to other formats or execute some other activity with this image. Is that correct ?
Thank you for sharing the information. We will get back to you as soon as the concerned IMAGINGJAVA-1431 will be resolved and request for your patience in this regard.
This is the great news. I will try new 19.11 version of Aspose Imaging library in the nearest future.
Actually for now I am using 19.10 version of Aspose Imaging library and I tried your solution.
I found, that your:
method started working much better.
It is looks like in this method you resize first and after that executing image rasterization.
It still a little bit blurred but manipulating of Quality option I reach much better quality.
So, tell me please, do you implemented .resize() method for vector images in Image class ?
Yes, this is exactly, what I was talking about ! Great, now this is working as it should be.
Did you implemented that only for SVG or for all type of vector formats (like SVG, EMF, WMF) ?