Jump to content

Image manipulation on Synology


roaku
Go to solution Solved by roaku,

Recommended Posts

I have a very specific question and corresponding problem.

I'm working on a plugin that utilizes the same image library as main Emby.

I have no issues on Windows or Ubuntu. I can resize images, draw shapes, and add text.

For whatever reason, the add text part isn't working for my plugin when it's under Emby on Synology.

Resizing and shapes still work fine. It's *only* adding text.

The attached images show what I mean. The bottom right of each image shows a filled circle with outline. The one on the left is from Windows, where the unicode text character renders on top of the background circle correctly. The other is from Synology and should look the same, but it's missing the text icon. The blue test text should be on the right also.

The code and build for the plugin is identical. There are no errors in the logs. It's just empty.

Does anyone have any insight on this? Is Emby writing text on images somewhere else or is this just something that hasn't come up?

I have verified that Emby is using the same image library version on Windows and Synology.

 

f85df9e99abe1b4b99c3d246e14f0a20.png.03c1c76b25e58626cabab3d21aa98403.png893b0107a98c40ee76e411997d6d9354.png.3cd7b9fa20ac602f7a1d1f9953a5d647.png

Link to comment
Share on other sites

Hi, I'm not sure. Your plugin is kind of in uncharted territory. I thought I saw you were using imagemagick. You could try skia instead.

Link to comment
Share on other sites

12 minutes ago, Luke said:

Hi, I'm not sure. Your plugin is kind of in uncharted territory. I thought I saw you were using imagemagick. You could try skia instead.

Thanks for responding.

I did switch to Skiasharp a few days ago after noticing it in the log for image caching and was able to remove the Magick.NET dependency I was relying on for the proof of concept.

At this point, I have no external dependencies and am using SkiaSharp to programmatically generate the overlays instead of using pre-built image files.

The only catch now is the aberrant behavior on Synology.

I'm asking around in other places more SkiaSharp oriented to see if there's anything I can do to configure the fonts or something before attempting to draw the text.

Link to comment
Share on other sites

  • Solution

The helpful folk over on the github repo for SkiaSharp were able to set me on the right path by pointing me to SKTypeface.FromStream.

From there, I was able to write text on Synology by embedding an appropriate font with the project and loading it if the fontmanager fails to deliver a system typeface.

Back on track for now.

Edited by roaku
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...