Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Problems with thumbnail images
Last Post 04-27-2010 11:44 AM by David To. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
JackUser is Offline
Posts:27
Avatar

--
04-14-2010 01:17 PM

    Hello,

    I am implementing a DR module that includes an image upload.

    We want to display a thumbnail of the image that users upload.

    The problem is that the thumbnail generation feature seems to be somewhat unreliable.  I noticed that sometimes it works and sometimes it does not work.  This seems to be related to the size / dimensions of the uploaded file.  I did a test where I uploaded the same version of an image at different sizes to see what would be created for the thumbnail.

    Width Height Type Thumb Width Thumb Height
    460 138 gif 460 138
    690 206 gif 1000 299
    1150 334 gif 1000 299
    460 138 jpg 460 138
    690 206 jpg 1000 299
    1150 334 jpg 1000 299

    The thumbnail type was set to relative.  The height is set to 150 and the width was set to 1000.

    In all instances I would have expected a thumbnail to be generated that was 502 X 150 or smaller.

    Then I uploaded an image that was 800 X 800.  The thumb showed up as 150 X 150 (as expected)

    Do you have any idea what's going on?

    Thanks - Jack

    JackUser is Offline
    Posts:27
    Avatar

    --
    04-16-2010 07:44 AM
    Anyone?
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-16-2010 08:34 AM
    HI Jack, I'll try some tests on my end and get back with you Monday morning. I personally do not know the algorithms involved in generated a thumbnail image. -- David
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-19-2010 10:12 AM
    HI Jack, I tried some test scenarios with Relative but haven't come to a definitive idea of what's going on yet. I need to submit my samples to Chad Nash for analysis and he won't be in until tomorrow so I'll get back with you tomorrow. -- David
    JackUser is Offline
    Posts:27
    Avatar

    --
    04-19-2010 01:42 PM
    Thanks, I appreciate the effort.
    -- Jack
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-20-2010 12:42 PM
    HI Jack, Chad provided me with the algorithm the thumbnail is using:

    '*** If the image is smaller than a thumbnail just return it
    If loBMP.Width < lnWidth AndAlso loBMP.Height < lnHeight Then
    Return loBMP
    End If

    The LoBMP is the actual file that is saved/uploaded (full image)

    The lnWidth and lnHight are the settings for the question itself.

    If loBMP.Width > loBMP.Height Then

    lnRatio = CDec(lnWidth) / loBMP.Width
    lnNewWidth = lnWidth
    Dim lnTemp As Decimal = loBMP.Height * lnRatio
    lnNewHeight = CInt(lnTemp)
    Else

    lnRatio = CDec(lnHeight) / loBMP.Height
    lnNewHeight = lnHeight
    Dim lnTemp As Decimal = loBMP.Width * lnRatio
    lnNewWidth = CInt(lnTemp)
    End If

    The module then determines the ratio and sets the new width and new height.

    -- David
    JackUser is Offline
    Posts:27
    Avatar

    --
    04-26-2010 08:04 AM
    So...
    It looks like the ratios are OK, but why is it in some cases generating thumbnails that are LARGER than the original files?

    -- Jack
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-26-2010 01:05 PM
    Perhaps because based on the logic of the code, if you actually set a width that is actually greater than the actual width of the uploaded picture, then the "lnRatio" will be greater than 1 so the new width is actually larger than the original width.

    Same concerning the "lmheight" setting. To sum it up, if you specify a height and width that is actually greater than the actual uploaded picture, then it will actually resize the thumbnail to be greater than the original uploaded picture.

    At least this is what I'm seeing based on looking at the code above. -- David
    JackUser is Offline
    Posts:27
    Avatar

    --
    04-27-2010 10:50 AM
    Can this be fixed?
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-27-2010 11:44 AM
    Yes, if you purchased the source for Dynamic Registration, you can modify this section of the code yourself. Otherwise, this would have to be custom changed through our premium support policy (http://www.datasprings.com/Premium-Support). -- David
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
     
     
       
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi