-
Notifications
You must be signed in to change notification settings - Fork 265
added svg support and modified Makefile enough so that it compiles #440
base: master
Are you sure you want to change the base?
Conversation
I forgot to mention one thing. The vector images are converted to raster and thus not retain their scalable nature. I am planing to implement functions to zoom in the image without loosing clarity in the future. |
Nice, added to my fork. Waiting for your next commit. |
Thanks for the suggestion Naheel. |
…o and fallback image size for documents that dont specify image size
…ith img->zoom = 1.0 because while scaling resolution of the image also changes
Implemented zoomingNow users can zoom in svg images without loosing quality. Because size (resolution) of the raster image changes when scaling svg images, zoom steps were increasing/decreasing exponentialy and the result was unusable. That's why while performing operations like Now that svg support has been implemented, I will work on error handling and checks so that the program won't break. And also try work on the make file. |
Now users can zoom in svg images without loosing quality. Because size (resolution) of the raster image changes when scaling svg images, zoom steps were increasing/decreasing exponentialy and the result was unusable. That's why while performing operations like img_check_pan and img_render, img->zoom property is forced to equal to 1.0 then reverted to the actual zoom value. Now that svg support has been implemented, I will work on error handling and checks so that the program won't break. And also try work on the make file. Ref. xyb3rt#440 (comment)
Great work! I found a little issue though. It seems that |
Yeah, I encountered this issue as well. I will look into it. Thanks |
Does anyone know why @muennich doesn't show up on the net? |
I figured out the solution to the |
@Dhruv-Vanjari you could always squash your commits :) As for getting the PR accepted, good luck. I thought muennich has made it pretty clear that he is not accepting any more pull requests, but that could of course still happen. |
@Dhruv-Vanjari nice work! |
I'm also having some kind of error. I works flawless afaik, but it does prints out to the terminal:
How to reproduce
What do I got so far diff --git a/image.c b/image.c
index a850533..0a7caf4 100644
--- a/image.c
+++ b/image.c
@@ -428,9 +428,6 @@ CLEANUP void img_close(img_t *img, bool decache)
imlib_free_image();
img->im = NULL;
}
-
- if (img->svg.h)
- g_object_unref(img->svg.h);
}
void img_check_pan(img_t *img, bool moved) |
Hi,
This is a loader for svg images.
I am not very good at
Makefile
so I have modified it just enough so that the code compiles.Makefile
has to be updated after this commit.The following libraries are used for loading svg documents
First the svg document is opened using
librsvg
and then rendered on acairo surface
, and finally the cairo surface pixel buffer is used to create anImlib_Image
.dependencies also need to updated in README after this commit.