This is a migrated thread and some comments may be shown as answers.

Is entire image always transferred?

11 Answers 176 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Larry asked on 09 Jul 2009, 05:14 AM
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-

11 Answers, 1 is accepted

Sort by
0
Growls
Top achievements
Rank 1
answered on 10 Jul 2009, 05:02 AM
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.
0
Rosen
Telerik team
answered on 13 Jul 2009, 06:04 AM
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.
0
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 13 Jul 2009, 06:53 PM
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-
0
Sebastian
Telerik team
answered on 14 Jul 2009, 09:35 AM
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.
0
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 14 Jul 2009, 06:18 PM
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-
0
Growls
Top achievements
Rank 1
answered on 14 Jul 2009, 10:08 PM
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.
0
Sebastian
Telerik team
answered on 15 Jul 2009, 10:34 AM
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.
0
John Hadjioannou
Top achievements
Rank 1
answered on 17 Jul 2009, 07:10 AM
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
0
Sebastian
Telerik team
answered on 17 Jul 2009, 10:21 AM
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.
0
Derek
Top achievements
Rank 1
answered on 04 Mar 2010, 06:03 PM
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.

0
Rosen
Telerik team
answered on 08 Mar 2010, 12:23 PM
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.
Tags
BinaryImage
Asked by
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Growls
Top achievements
Rank 1
Rosen
Telerik team
Larry
Top achievements
Rank 1
Iron
Iron
Veteran
Sebastian
Telerik team
John Hadjioannou
Top achievements
Rank 1
Derek
Top achievements
Rank 1
Share this question
or