Log in | Register | Lost password

Bottom
if PN compression enabled, main image won't display
  • Posted: 29.04.2003, 18:35
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    If I enable PN compression, thumbnails are shown OK,
    but when clicking on a thumbnail, the large image can not be displayed.

  • Posted: 29.04.2003, 21:52
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    There's a temporary solution in http://www.elfisk.dk/modules.php?op=modload&name=XForum&file=viewthread&tid=30#pid107
  • Posted: 29.04.2003, 23:06
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0

    Quote

    There's a temporary solution in http://www.elfisk.dk/modules.php?op=modload&name=XForum&file=viewthread&tid=30#pid107


    I think I found better solution. In the function photoshare_userapi_dumpimage() in pnuserapi in the following code

    [php]
    if (!pnModGetvar('photoshare', 'useimagedirectory'))
    {
    $data = photoshareGetImageData($imageID, $owner, $thumbnail, !$thumbnail);

    if (is_bool($data) && $data == false)
    return false;
    }
    [/php]

    you have to comment out "if" statement, so it will always call photoshareGetImageData() and thus determine mime type.

    P.S. Stupid trollix forum changed & from ampersand sign; anyway you get the idea.

    [Edited on 29/4/2003 by olegs]
  • Posted: 30.04.2003, 08:12
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    You are right - I know - and it will be fixed correctly in the next version of Photoshare. But the other fix is a lot simpler to explain to others.
  • Posted: 30.04.2003, 21:48
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Actually the simple fix is closer to the correct than you propose (and as I would have proposed myself). All images are always stored as PNG files! So no matter the original content-type the new one should be "image/png".
  • Posted: 30.04.2003, 23:32
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0

    Quote

    Actually the simple fix is closer to the correct than you propose (and as I would have proposed myself). All images are always stored as PNG files! So no matter the original content-type the new one should be "image/png".


    In my nuke_photoshare_images ps_mimetype is image/pjpeg. So I prefer to send mimetype stored in database and not to care about global defaults.

    I think it is better to always store mimetype and send Content-type header to ensure future extensions will work OK.

    I would not always convert uploaded images to PNG, except thumbnails. There may be progressive JPEGs prepared for faster loading, etc.



Template courtesy of Designs By Darren.