Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#70 Add config option to disable cover art resizing

open
None
5
2015-02-02
2012-01-30
Anonymous
No

The attached patch adds a config file option to disable cover art resizing.

resize_covers=no

Discussion


  • Anonymous
    2012-01-30

    I get an error page (served with the wrong MIME type) when I try to download the patch. Is anyone able to access it?

     

  • Anonymous
    2012-02-19

    • assigned_to: nobody --> jmaggard
     
  • BT
    BT
    2012-07-11

    I use BubbleUPnP renderer on an Android smartphone and the album art was too small without this patch.

    Please merge this patch. Thanks.

     
  • Glenn Cooley
    Glenn Cooley
    2012-12-25

    I am extremely interested in seeing the patch merged. I use minidlna with BubbleUPnP. The covert art is tiny and looks terrible when BubbleUPnP scales it. I know it's against DLNA standards, but could there be an option to set the resize, or choose a different size? minidlna is a fantastic program.

     
  • BT
    BT
    2013-07-03

    I've adjusted the patch to apply cleanly against 1.1.0, but the covers are still resized even with 'resize_covers=no'. The daemon also ends up running in the foreground when 'resize_covers' is present in minidlna.conf.

    I can't figure out what is causing this. Any chance of a working patch against 1.1.0? I find this feature very useful.

     
    • Ian Pilcher
      Ian Pilcher
      2013-11-07

      Here is an updated patch that I am using. I don't see either of the issues that you describe.

       
  • BT
    BT
    2013-11-07

    @Ian

    It works! Thank you very much. The only difference between your patch and mine is that you set 'NO_COVER_RESIZE_MASK' to '0x0020' and I set it to '0x0012'.

     
  • Glenn Cooley
    Glenn Cooley
    2013-11-10

    Is it possible to incorporate this into the pre-compiled release version? I use minidlna on my DD-WRT, but don't have a linux computer to compile on, nor the no-how. I'm sure others would enjoy/benefit from the option of no cover resizing. Great product - thanks.

     
    • Ian Pilcher
      Ian Pilcher
      2013-11-10

      As far as I am aware, Justin has never commented on this patch/feature, so I have no idea what it would take to get it committed.

       
  • Josh Stone
    Josh Stone
    2014-03-22

    I've updated the patch for 1.1.2. I only adjusted the context for the added option, and matched the new way image_save_to_jpeg_file is called.

     
  • BT
    BT
    2014-04-09

    Updated patch against 1.1.2 to fix compile after commit 9eec5b8cac.

    Edit: Patch removed.

     
    Last edit: BT 2014-04-09
  • BT
    BT
    2014-04-09

    Oops. I just noticed that an updated patch against 1.1.2 has already posted been posted by Josh Stone.

     
    Last edit: BT 2014-04-09
    • Josh Stone
      Josh Stone
      2014-04-09

      No problem. I was going to look at yours to make sure that we did the same thing, but you already removed it. I trust you'll let me know if there's any issue with how I did it. :)

       
      • BT
        BT
        2014-04-09

        It wasn't the same. I just fixed it so it would compile, but you also took into account the modifications to image_save_to_jpeg_file. So your patch is correct. ;)

         
  • Darkvater
    Darkvater
    2014-09-15

    The problem with not resizing the cover art is that 90% of the cases you actually want the JPEG_TN version of your thumbnail as you are browsing your media. Only when you open it do you want a bigger version. BubbleUPNP properly does this: while you are browsing it requests JPEG_TN, when you start playing the media it requests JPEG_SM (if available)*.

    Anyways, I've implemented a better albumart resize over at https://github.com/Darkvater/minidlna/tree/multiple_sized_thumbnails
    By default the albumart is copied to the cache directory and a thumbnail image saved. We do advertise JPEG_TN, JPEG_SM, JPEG_MED and when this is requested we just resize the original thumb on demand, saving the result for future use.

    [*] XBMC (PLatinum UPNP) is of course totally bonckers and always requests JPEG_TN and expects full HD images which the XBMC client serves sigh. Why is DLNA such a mess?

     
  • Josh Stone
    Josh Stone
    2014-10-07

    FWIW, my 1.1.3 patch applies fine to 1.1.4 -- just one hunk gets offset automatically.

    @Darkvater, any discussion with Justin whether your approach might be merged?

     
  • Darkvater
    Darkvater
    2014-10-08

    @Josh I've talked to Justin before somewhere in June I believe on some other unrelated changes (additional metadata) but although he was quite supportive, have not heard back from him. I think he is very busy. Oh well, maybe at some time in the future. It's on github for anyone who wants to play with it :)

     
  • HPP8140
    HPP8140
    2015-01-21

    I commented out the following code in albumart.c a while ago, now I just noticed the cached album art is twice the size of the folder art? For example:

    video.mp4
    video.jpg

    video.jpg is 320x180

    video.jpg ends up being 640x360 in the minidlna cache directory?


    if( imsrc->width > imsrc->height )
    {
    dstw = 160;
    dsth = (imsrc->height<<8) / ((imsrc->width<<8)/160);
    }
    else
    {
    dstw = (imsrc->width<<8) / ((imsrc->height<<8)/160);
    dsth = 160;
    }

     
  • HPP8140
    HPP8140
    2015-02-02

    Found the fix to keep image size. Changed bolded number from 1 to 8 in albumart.c

    imsrc = image_new_from_jpeg(file, 1, NULL, 0, **8**, ROTATE_NONE);
        if( imsrc )
        goto found_file;
    
     
    Last edit: HPP8140 2015-02-02