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

OutOfMemoryException large images

4 Answers 43 Views
SlideView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dev
Top achievements
Rank 1
dev asked on 03 Apr 2014, 03:48 PM
Hi,
I created a sample app:

https://dl.dropboxusercontent.com/u/26312884/PhoneApp_SlideViewExample.zip

I have OutOfMemoryException with large images.

Do you have a Example for resolutions?
I do not know how to solve

4 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 07 Apr 2014, 02:05 PM
Hello Ivan,

Thanks for writing.

It is very important to know that JPEG images are decoded to Bitmaps when visualized in a Windows Phone application. If a JPEG takes a megabyte to be stored, when decoded it will take the size of a Bitmap in the RAM. So, according to its physical dimensions, this size might be 30-40-50-60 megabytes.

A Windows Phone application has limitations on the amount of RAM it can use. For Windows Phone 7 the memory cap is set to be 90 MB. So, as you can see, opening just a single image might crash your application.

The simple rule of thumb here is to use thumbnails. Basically, you need to calculate the size of your images in such a way, that you comply with the memory limitations imposed on your application.

I hope this is helpful.

Regards,
Deyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
dev
Top achievements
Rank 1
answered on 07 Apr 2014, 02:16 PM
Hello,
thank you for response.
i'm read in your documentation integration between SLIDEVIEW and RadBusyIndicator.

I'm implemented on my project but not it works (not show progress or busy indicator)

this is a code

<Grid x:Name="LayoutRoot" Background="Transparent">
 
        <telerikPrimitives:RadSlideView x:Name="slideView"
                                        ItemsSource="{Binding}"
                                        IsFilmstripModeEnabled="True"
                                        ItemRealizationMode="ViewportItem"
                                        IsLoopingEnabled="True">
            <telerikPrimitives:RadSlideView.ItemContainerStyle>
                <Style TargetType="slideView:SlideViewItem">
                    <Setter Property="BusyIndicatorStyle">
                        <Setter.Value>
                            <Style TargetType="telerikPrimitives:RadBusyIndicator">
                                <Setter Property="AnimationStyle" Value="AnimationStyle7" />
                                <Setter Property="InitialDelay" Value="0:0:0"/>
                                <Setter Property="Visibility" Value="Visible" />
                            </Style>
                        </Setter.Value>
                    </Setter>
                </Style>
            </telerikPrimitives:RadSlideView.ItemContainerStyle>
            <telerikPrimitives:RadSlideView.ItemTemplate>
                <DataTemplate>
                    <telerikPrimitivesSlideView:PanAndZoomImage Source="{Binding ImageSource}" Stretch="Uniform" ZoomMode="Free" />
                </DataTemplate>
            </telerikPrimitives:RadSlideView.ItemTemplate>
            <telerikPrimitives:RadSlideView.FilmstripModeItemTemplate>
                <DataTemplate>
                    <Image Source="{Binding ThumbnailSource}" Width="480" Stretch="Uniform"/>
                </DataTemplate>
            </telerikPrimitives:RadSlideView.FilmstripModeItemTemplate>
        </telerikPrimitives:RadSlideView>
 
    </Grid>

0
Todor
Telerik team
answered on 08 Apr 2014, 11:03 AM
Hello,

I have answered to your support ticket regarding the same question. In short, in your project the indicator is not displayed because the images are loaded fast enough so it is redundant.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
dev
Top achievements
Rank 1
answered on 08 Apr 2014, 11:39 AM
Ok thanks
Tags
SlideView
Asked by
dev
Top achievements
Rank 1
Answers by
Deyan
Telerik team
dev
Top achievements
Rank 1
Todor
Telerik team
Share this question
or