Is entire image always transferred?

12 posts, 0 answers
  1. Larry
    Larry avatar
    22 posts
    Member since:
    Jun 2009

    Posted 09 Jul 2009 Link to this post

    Hi there.  If I have a 10 MB jpeg stored in a database but specify displaying an image 389 x 259 - what will be transferred to the client?

    Thanks,

    -ldl-
  2. Growls
    Growls avatar
    15 posts
    Member since:
    Apr 2009

    Posted 10 Jul 2009 Link to this post

    if you load it up in firefox or IE 8, right click the image and select properties. it will tell you the dimensions and size etc. let me know how you go please, I am looking to use this control as well.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 13 Jul 2009 Link to this post

    Hello,

    RadBinaryImage control will transfer all of the given data which is feeded to it. Also please have in mind that RadBinaryImage use temporary in-memory storage therefore it is not very suitable for transferring such big amount of data and such scenarios should be avoided.

    Greetings,
    Rosen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Larry
    Larry avatar
    22 posts
    Member since:
    Jun 2009

    Posted 13 Jul 2009 Link to this post

    Thanks - that is what I was looking for.  I wondered if it might downsample for me automatically (or have such a thing as an option).  Allow me to suggest that as a future feature...

    -ldl-
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 14 Jul 2009 Link to this post

    Hello Larry,

    Thank you for sharing your idea with us, however we will appreciate if you elaborate a bit more on this part of your reply:

    "...downsample for me automatically..."

    Basically, RadBinaryImage serves the entire image streamed from the source (no data loss or reduced data transfer is possible) and probably for your scenario it would be better to use static image (if applicable) with ImageUrl specified for our binary image.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Larry
    Larry avatar
    22 posts
    Member since:
    Jun 2009

    Posted 14 Jul 2009 Link to this post

    Sure - here's my scenario.  I'm a photographer.  I would love to be able to store one full size/full resolution copy of each image in a database.  This would, for example, be a 10 MB Jpeg.

    However, I would like to be able to 'use' that image in a number of differernt scenarios.  For example, displaying a thumbnail image - or displaying a larger view (say the 389 x 259 I mentioned earlier) - or perhaps a full page view.

    In each of the scenarios I just mentioned, if I am displaynig the image on the web, it will be at 72 DPI.  The image itself is stored at 300 DPI.

    Therefore, if I had an option with RadBinaryImage to specify the size and resolution of the image I want to work with - then have the control do this resizing on the server for me - that would be awesome.

    Hopefully that makes sense.  Let me know if not...

    Thanks!

    -ldl-
  8. Growls
    Growls avatar
    15 posts
    Member since:
    Apr 2009

    Posted 14 Jul 2009 Link to this post

    personally I use something like this:
    http://forums.asp.net/t/29645.aspx
    to resize the image, although I changed it a little to return a bitmap object instead of saving the file to disk. I save both the thumb image and the full image to the database.
    you can change it to resize on the fly im sure.
    you might want to run some tests as to performance if you use it though.
  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 15 Jul 2009 Link to this post

    Hello guys,

    Indeed the approach posted in the ASP.NET forums might be useful to achieve the goal set forth. Another option would be to utilize the built-in GridBinaryImageColumn (introduced with the Q2 2009 release of the suite) with its Crop/Fit functionality presented on this demo:

    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultcs.aspx?product=grid

    Still have in mind that the 10MB image will be stored in the memory internally in order to operate with the images from the database and we do not recommend that due to performance reasons.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. John Hadjioannou
    John Hadjioannou avatar
    30 posts
    Member since:
    Dec 2005

    Posted 17 Jul 2009 Link to this post

    Hi

    I agree about the undisirability of holding large images in memory, but I think that BinaryImage would benefit from fit/crop type functionality - I'd certainly use it!

    John
  11. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 17 Jul 2009 Link to this post

    Hello John,

    Thank you for the feedback. I will forward your proposal to our development department to be considered for the next versions of RadBinaryImage. I updated your Telerik points for sharing your idea with us.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  12. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 04 Mar 2010 Link to this post

    I would go a little bit further with the feature suggestion; here's what I'd like to see.

    Resize on Upload
    Allow users to upload any image size, but allow the setting of max height/width for saving. For example, users upload an image that is 4000x3000, but I don't want to save anything larger than 640x480, so the image is automatically downsized before saving to the database. I've struggled with doing this manually after an upload, but it would be much more convenient if it could be done automatically.

    Watermark Feature
    Include the ability to automatically display a watermark on an image (not as a layer) at display time.

  13. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 08 Mar 2010 Link to this post

    Hello Derek,

    As you may know RadBinaryImage itself does not have built-in uploading functionality. Therefore, if your requirements is to store smaller sized images, you can resize the them manually when they are uploaded into the database and then use the already resized image's data  to populate the RadBinaryImage control.

    Regarding your other suggestion, I will forward it to our development department for further consideration. Thus if this appears to be a common request and attainable enhancement, you may see it included in a future version of the product. In the meanwhile you may consider manually applying the watermark to the image data before it is passed to the control.

    Best regards,
    Rosen
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017