Thanks Nathan.

With this option I can obtain the image characteristics but I don't
know the option that indicates me the depth of the pixel. Width and
Height are in outWidth and outHeight but I don't know where is the
depth. I thought use the getRowBytes() of Bitmap and product it with
getHeight() of Bitmap, but I don't know if there is correct.

On 23 jul, 18:52, Nathan <nathan.d.mel...@gmail.com> wrote:
> If you can get the width and height for the image without completely
> opening it, then use the width*height*depth.
>
> You probably have to use this option:
>
> http://developer.android.com/intl/de/reference/android/graphics/Bitma...
>
> Nathan
>
> On Jul 23, 9:30 am, ReyLith <jesus...@gmail.com> wrote:
>
>
>
> > So, how can I obtain the depth for know if I can work with the image?
>
> > On 23 jul, 18:18, DanH <danhi...@ieee.org> wrote:
>
> > > The size of an image file depends greatly on the compression
> > > techniques used to create it.  Virtually all image formats involve
> > > some sort of compression such that the total number of bits in the
> > > file is considerably less than the (width * height * depth) number
> > > that represents the raw image.
>
> > > On Jul 23, 7:27 am, ReyLith <jesus...@gmail.com> wrote:
>
> > > > Hi again,
>
> > > > I'm trying to put a message when the image is so big. For this I think
> > > > to obtain the size of the file and compare it with the free memory
> > > > Runtime.getRuntime().getFreeMemory()). It works well but I have a new
> > > > problem. The application show an error message with some images
> > > > because they are so big and the application dont't detect the problem.
> > > > I research in other posts and the problem is that the file size is
> > > > different from the size of the image in memory. To get the size of the
> > > > image in memory I use the product getHeight () * getRowBytes () of the
> > > > Bitmap class, but with some images not previously had problems, I get
> > > > very large sizes, so often I get the message erroneously.
>
> > > > Does anyone know how could solve this problem?
>
> > > >  Thank you very much in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to