kanipek 229 Posted August 21, 2017 Posted August 21, 2017 Has something changed with Channel logos? I have been changing logos since I started using Emby without issue. Drag/drop upload and the image is there. Now what I am seeing is they are being clipped or resized. Has something changed with logo dimensions? Screenshot attached of what I am seeing - "Emby" is what I am now seeing in Emby, "nbcHD" is the logo I am uploading Thanks for reading and any help!
Luke 38804 Posted August 21, 2017 Posted August 21, 2017 We are cropping the transparent space out in order to ensure the look is what we are designing for.
d00zah 140 Posted August 21, 2017 Posted August 21, 2017 But you are cropping out white text on the transparent background. I think your 'whitespace' detection for .pngs remains overly aggressive. .png mages selected for upload: How Emby interprets them: 1
kanipek 229 Posted August 21, 2017 Author Posted August 21, 2017 But you are cropping out white text on the transparent background. I think your 'whitespace' detection for .pngs remains overly aggressive. .png mages selected for upload: post-10374-0-86165700-1502836291.jpg post-10374-0-31327000-1502836301.jpg How Emby interprets them: post-10374-0-75869700-1502836262.jpg post-10374-0-36218500-1502836309.jpg Same exact behavior I am seeing on those same logos and many others.
kanipek 229 Posted August 21, 2017 Author Posted August 21, 2017 We are cropping the transparent space out in order to ensure the look is what we are designing for. Okay but it is cropping incorrectly. I have a lot of logos you can't even tell what channel they are for anymore. This needs to be looked at again, or you need to tell us how to get the logos to look the same as they did previously. Did the acceptable dimensions change for logos?
d00zah 140 Posted August 21, 2017 Posted August 21, 2017 (edited) The 'acceptable dimensions' are a recent thing. See: https://emby.media/community/index.php?/topic/49351-image-processing-on-channel-logos-is-horrible/ https://emby.media/community/index.php?/topic/49441-channel-logos/ Best I can figure, the OP didn't standardize on a specific size image & expected to rely on Emby to make them all uniform... which, when implemented, hosed others who had taken the time (or drew logos from a standardized source). @@kanipek, am I correct in assuming, like me, you use MyChannelLogos in WMC as your logo source? I've been experimenting & just saving the .png images as .jpg results in a horrible image. Next, I tried creating a black 215x75 image & overlaying the .png on it before saving as a .jpg. This preserves the quality, but it's time consuming (& I just finished this exercise shortly before this 'fix' was implemented). Edited August 21, 2017 by d00zah
kanipek 229 Posted August 21, 2017 Author Posted August 21, 2017 The 'acceptable dimensions' are a recent thing. See: https://emby.media/community/index.php?/topic/49351-image-processing-on-channel-logos-is-horrible/ https://emby.media/community/index.php?/topic/49441-channel-logos/ Best I can figure, the OP didn't standardize on a specific size image & expected to rely on Emby to make them all uniform... which, when implemented, hosed others who had taken the time (or drew logos from a standardized source). @@kanipek, am I correct in assuming, like me, you use MyChannelLogos in WMC as your logo source? I've been experimenting & just saving the .png images as .jpg results in a horrible image. Next, I tried creating a black 215x75 image & overlaying the .png on it before saving as a .jpg. This preserves the quality, but it's time consuming (& I just finished this exercise shortly before this 'fix' was implemented). I don't use a lot of mychannellogos - logos. A few perhaps. Where did you get 215x75? Is that actually spelled out somewhere? I can understand the coders making changes, aiming for consistency across the various apps. I just wish these type of things were documented someplace, I have looked, what I did find was out of date. 90% of my logos are transparent and of that 90% about 80% are victims of this transparent space cropping. If it was a simple thing to change each logo I would be less concerned. But it is time consuming to change each and every logo, simple enough for 1 logo not so simple for 180 or so.
d00zah 140 Posted August 21, 2017 Posted August 21, 2017 I don't use a lot of mychannellogos - logos. A few perhaps. Where did you get 215x75? Is that actually spelled out somewhere? I can understand the coders making changes, aiming for consistency across the various apps. I just wish these type of things were documented someplace, I have looked, what I did find was out of date. 90% of my logos are transparent and of that 90% about 80% are victims of this transparent space cropping. If it was a simple thing to change each logo I would be less concerned. But it is time consuming to change each and every logo, simple enough for 1 logo not so simple for 180 or so. The size I used was based on various, available 'BIG' images from MyChannelLogos. With those as a template, I created a set of standardized .png images that looked uniform in both WMC & Emby... until the bugfix. The images recommended in the 1st link (original problem) were a mix of 'hi-res' .jpg image resolutions'. As far as I'm aware, no 'spec' for these images existed until this change. I'm not sure I believe the design decision was particularly well-considered & unfortunately, we are the casualties. As my logos are coming from WMC, via ServerWMC/plugin, I'm wondering what will happen if I only use modified logos in Emby. Will a 'Guide Refresh' re-import the original, non-spec logos?
kanipek 229 Posted August 21, 2017 Author Posted August 21, 2017 The size I used was based on various, available 'BIG' images from MyChannelLogos. With those as a template, I created a set of standardized .png images that looked uniform in both WMC & Emby... until the bugfix. The images recommended in the 1st link (original problem) were a mix of 'hi-res' .jpg image resolutions'. As far as I'm aware, no 'spec' for these images existed until this change. I'm not sure I believe the design decision was particularly well-considered & unfortunately, we are the casualties. As my logos are coming from WMC, via ServerWMC/plugin, I'm wondering what will happen if I only use modified logos in Emby. Will a 'Guide Refresh' re-import the original, non-spec logos? Sounds like your set up is different than mine. I left WMC a year ago - no DRM to worry about so Emby works well for my needs. So you are getting your Live TV/EPG via ServerWMC into Emby? I am not sure about your set up. If you are making the changes to the logo(s) from within Emby (via Edit Image for a channel) I think that would not get overwritten. In my case using Emby Live TV when I change a logo - overwriting what is downloaded from Schedules Direct that logo does not get overwritten by a guide refresh,
d00zah 140 Posted August 21, 2017 Posted August 21, 2017 Some of my logos were from Schedules Direct (WMC / EPG123... DRM), so maybe it was those that were affected. I really didn't think the logos would get overridden, but I've started thinking defensively. The 'seminal' thread I linked to had a link to a site w/ HD images. You may find some alternatives there which comport with the new standard.
pünktchen 1331 Posted August 21, 2017 Posted August 21, 2017 @@d00zah it seems to me as you're thinking i'm the reason for your problems. Just to be clear, that's not the case! I've never requested any of those image processing changes and i would be more than happy if it would be completely removed again.
garyan2 53 Posted August 22, 2017 Posted August 22, 2017 Because I'm a "victim" to the cropping as well, I'd like to share what I have done with EPG123 to crop and resize images downloaded from Schedules Direct. You can set the size to anything you want with good results. The function uses the Alpha channel of each pixel to determine the crop size and location. In theory, an alpha channel above 0 would be exactly what is needed, but I found some images from SD had a random pixel with an alpha value above 0. I changed it to use a alpha value of 255 (0% transparent) instead. Being targeted towards WMC, the image is centered vertically in the defined canvas height while the width is the size of the cropped image not to exceed the defined canvas width. This of course will only work for png files with transparent backgrounds. I haven't looked at jpeg at all which would need some more intelligence in the code to determine what pixels belong to the logo and what pixels are background. I can certainly appreciate the difficulty in building code to accommodate the many different image formats. Feel free to reuse any/all of the code. private static bool downloadSDLogo(string uri, string filepath, bool bigLogo) { try { // set target image size int tgtHeight = (bigLogo) ? 75 : 64; int tgtWidth = (bigLogo) ? 225 : 144; System.Net.WebClient wc = new System.Net.WebClient(); using (MemoryStream stream = new MemoryStream(wc.DownloadData(uri))) { // crop image Bitmap cropImg; using (Bitmap origImg = Image.FromStream(stream) as Bitmap) { // Find the min/max non-transparent pixels Point min = new Point(int.MaxValue, int.MaxValue); Point max = new Point(int.MinValue, int.MinValue); for (int x = 0; x < origImg.Width; ++x) { for (int y = 0; y < origImg.Height; ++y) { Color pixelColor = origImg.GetPixel(x, y); if (pixelColor.A == 255) { if (x < min.X) min.X = x; if (y < min.Y) min.Y = y; if (x > max.X) max.X = x; if (y > max.Y) max.Y = y; } } } // Create a new bitmap from the crop rectangle and increase canvas size if necessary int offsetY = 0; double tgtAspect = (double)tgtWidth / (double)tgtHeight; Rectangle cropRectangle = new Rectangle(min.X, min.Y, max.X - min.X + 1, max.Y - min.Y + 1); if (((double)(max.X - min.X + 1) / tgtAspect) > (max.Y - min.Y + 1)) { offsetY = (int)((max.X - min.X + 1) / tgtAspect - (max.Y - min.Y + 1) + 0.5) / 2; } cropImg = new Bitmap(cropRectangle.Width, cropRectangle.Height + offsetY * 2); cropImg.SetResolution(origImg.HorizontalResolution, origImg.VerticalResolution); using (Graphics g = Graphics.FromImage(cropImg)) { g.DrawImage(origImg, 0, offsetY, cropRectangle, GraphicsUnit.Pixel); } } // resize image and save int destWidth = Math.Min((int)((double)tgtHeight / (double)cropImg.Height * (double)cropImg.Width), tgtWidth); Bitmap destImg = new Bitmap(destWidth, tgtHeight); destImg.SetResolution(cropImg.HorizontalResolution, cropImg.VerticalResolution); using (Graphics g = Graphics.FromImage(destImg)) { g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy; g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; using (var wrapMode = new System.Drawing.Imaging.ImageAttributes()) { wrapMode.SetWrapMode(System.Drawing.Drawing2D.WrapMode.TileFlipXY); g.DrawImage(cropImg, new Rectangle(0, 0, destWidth, tgtHeight), 0, 0, cropImg.Width, cropImg.Height, GraphicsUnit.Pixel, wrapMode); } } destImg.Save(filepath, System.Drawing.Imaging.ImageFormat.Png); return true; } } catch (Exception ex) { Logger.WriteVerbose(ex.Message); } return false; } 1
d00zah 140 Posted August 22, 2017 Posted August 22, 2017 @@d00zah it seems to me as you're thinking i'm the reason for your problems. Just to be clear, that's not the case! I've never requested any of those image processing changes and i would be more than happy if it would be completely removed again. Sincerely sorry. Yesterday was 'less than optimal' all around.
gismo33 3 Posted December 1, 2019 Posted December 1, 2019 Hi, sorry to open this ticket again. I got weird tv logo image sizes: The default view for tv logos under "home" or "Live TV -> programs" is the poster view but since most tv logos are more wide than high this looks bad (see attachment "tv_programs_view"). When I click to "Live TV -> channels" each the default "view option" is "thumb" which looks much better since each tv logo is more wide than tall (see attachment "tv_channels_view"). So emby should either always display live tv items in "thumb view" (and not in "poster view") or should resize the logos correct in "poster view" so that the logo is not cropped (see again attachment "tv_programs_view"). Much thanks
ebr 15427 Posted December 1, 2019 Posted December 1, 2019 Hi. Our guide data provider has portrait images for programs so that is why that is the default. There is a difference between program images and channel logos. In your first screen shot you should be seeing program images (images for the specific shows). In your second one, it is showing channel logos.
pünktchen 1331 Posted December 1, 2019 Posted December 1, 2019 But the Emby guide data provider also has landscape images. So why isn't that the default? Landscape is the default in every app but Emby.
Luke 38804 Posted December 2, 2019 Posted December 2, 2019 Options are always possible for the future.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now