Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Is there a way to resample an image while resizing? Current resizing of imported images gives bad quality.

0 votes
If I inport a small image (let's say a png file) and still change the size a bit to make it smaller, the quality drops significantly. So I ended up resizing in external apps (e.g. IrfanView) and import already resized images, but it's hard to match the exact size needed to fit the diagram nicely.

Does yEd support some resampling while resizing?
in Help by (140 points)

1 Answer

0 votes
Unfortunately, no. yEd does not support resampling images while resizing image nodes.
by [yWorks] (161k points)
Thanks for quick answer! Do you know if that's considered as a new feature in the near future? It's pretty annoying to resize externally...
No, we do not plan to add support for resampling. If you need custom symbols that scale well, you need to use SVG documents instead of raster images.
Ok, I understand, however I find it strange. It's not a particularly complicated feature. I (and I suppose many other users as well) quite often have to use raster images in my diagrams, not everything is available as SVGs (e.g. images of particular products/elements).
I guess my original answer should have been more detailed. Even though yEd does not resample an image when you resize the corresponding node, the Java rendering framework that ultimately displays the image on screen does resample the image. Thus you would not get better results if yEd resampled images as well.

Actually, the opposite is the case. When you resample an image when its size is reduced, you lose information (because pixels are removed from the image). If you grow the image back to its original size afterwards, the image will then look (much) worse than the original image because the information from the removed pixels cannot be recreated (well, in the general case that is - there are of course trivial cases like uni-colored rectangles where "shrink then grow" will have no adverse effects).
Of course, it would be possible to store both the original image and the resampled image, but this approach would be very costly in terms of memory without any gain (because the stored resampled image would be the same that the Java rendering framework produces anyway).

If you resample an image in an image editing application and then display that image in a node with the image's new size the result will be better than shrinking the node with the original image because image editing applications usually have more sophisticated resampling algorithms than the ones implemented in the Java rendering framework.
Legal Disclosure | Privacy Policy
...