Android :: Setting Camera Image Size?

Aug 17, 2010

At the moment I am attempting to set my camera on my Motorola Droid phone to take an image that matches the size of my screen (854 x 480 pixels), and I am attempting to accomplish via the parameters for the camera as such:

CODE:.................

I have my activity implement the Camera.PictureCallback method of onPictureTaken (excluding log calls), so when the takePicture method is called it runs this method:

CODE:..........

For some reason though, my camera is taking pictures in 1280 x 960. Is this some sort of minimum size the camera can capture an image in? From log calls I can see that the Camera's parameters are still set to have a picture size of 854 x 480, but image keeps coming out as 1280 x 960. Am I decoding the image incorrectly, am I setting the camera's parameters incorrectly, or am I doing something else wrong?

Android :: Setting camera image size?


Android :: 1.6 Camera Rotation / Image Size

Oct 21, 2009

My application while compiled in 1.5 works fine. I had some memory issues w/ 1.6 due to image size, which was strange b/c the image size increased when taking photos by taking a picture w/ surfaceholder/imagecapture callback. I seem to have fixed re-displaying those images by resizing them using a bitmapfactory matrix. But my camera is now rotating everything 90 degrees. It appears that my Override of surfaceChanged does nothing, which is where I was setting rotation at 90 (I can't remember why, it was 10 months ago!). I have tried at rotating the camera parameters paramters at 90 degrees, 0 degrees.

View 2 Replies View Related

Android :: Full Size Image Back From Camera Using MediaStore.IMAGE_CAPTURE?

Jan 8, 2010

I managed to figure out how to get the camara application to give me an image, but it is rather tiny, only 18k. Has anyone figured out a reliable way to get a full-sized image returned if you are using a MediaStore.IMAGE_CAPTURE intent?

View 2 Replies View Related

Samsung Fascinate : Setting For Camera Image File Storage?

Sep 12, 2010

Is there a setting that controls where the camera's picture and video files get stored? This was in every phone camera I have used before getting the Fascinate. Not finding it in the camera - settings menu.

View 1 Replies View Related

Android :: Image View That Is Fixed Size Regardless Of Image Size

Nov 16, 2010

I have an ImageView which I want to always be the same size. If the image is smaller than the view, I'd like it to be centred in the view. If the Image is larger than the view then I'd like it scaled down - with aspect ratio preserved.I've had several attempts at this myself

View 2 Replies View Related

Android :: How Do I Make My Image View Fixed Size Regardless Of Size Of Bitmap

Sep 23, 2010

So I'm loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in a ListView in android. I'd like to fix the size of my ImageView so that it only shows a portion of the image if it's larger than a preset amount. I've tried everything I can think of setting the setMaxWidth/setMaxHeight, setting the scale type to centerCrop, using ClipableDrawable wrapping my BitmapDrawable, setting using Drawable.setBounds(). I've tried setting in the XML and programmatically, but neither worked. I'm very surprised setting max width/height didn't do anything. Below is the XML I'm using ImageView definition in my layout file

View 1 Replies View Related

Android :: Size Of Image Is Larger Than Or Smaller Than Specified Display Size

Jan 22, 2009

if size of image is larger than or smaller than specified display size (on screen), then it is automatically, compressed and stretched resp by android run time or require to handle by explicitly.

View 2 Replies View Related

Android :: Objective Of Setting The Minimum Heap Size In An App

Oct 5, 2009

In google's Calendar app for Android OS, you will encounter this line in the onCreate method of CalendarActivity.

// Eliminate extra GCs during startup by setting the initial heap size to 4MB.
VMRuntime.getRuntime().setMinimumHeapSize(INITIAL_HEAP_SIZE)

Can someone explain why setting it to 4MB will eliminate GCs ? Thanks

View 1 Replies View Related

Android :: How To Size Android Components According To Image Size Using XML

Feb 10, 2009

I have created a custom icon bar in Android using the XML layout creator, using a RadioGroup within a LinearLayout (XML included below). Each RadioButton within the RadioGroup has a custom drawable (with checked and unchecked states) as its android:button attribute. The Linear layout is itself within a RelativeLayout so that it can appear at an arbitrary position on the screen (as a side bar, in this instance).The drawables are 55 pixels wide, and the android:layout_width attribute of all these views is "wrap_content".When I make this component visible, aligned to the bottom-left of the screen, only about three-quarters of the RadioButton image widths are visible. Setting the layout_width of the RelativeLayout to "fill_parent" rectifies this and causes the full button to appear.However this means that the button group consumes click events across the entire width of the screen. How can I make the entire button appear, and have only the area of the button respond to clicks? Hard-coding the width of the drawable is not a particularly desirable solution.<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width ="wrap_content" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/LinearLayout02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_below ="@+id/LinearLayout01" android:visibility="invisible"><RadioGroup android :id ="@+id/ RadioGroup01" android:layout_height="wrap_content" android:checkedButton="@+id/RB01" android:layout_width="fill_parent">
<RadioButton android:id="@+id/RB01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR01"/><RadioButton android:id="@+id/RB02" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR02"/>
<RadioButton android:id="@+id/RB03" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR03"/> <RadioButton android:id="@+id/RB04" android:layout_width="fill_parent" android:layout_height="wrap_content" android:button="@drawable/DR04"/> </RadioGroup></LinearLayout>

View 2 Replies View Related

Android :: Change Image Size

Nov 15, 2010

Principle of the image to be displayed: *Bitmap _scratch = BitmapFactory.decodeResource (getResources (), R.drawable.skalyzmn); canvas.drawBitmap (image, x, y, null);*

How to use this method to reduce or increase the picture?

What you need to add that the picture was of such size that I want?

View 1 Replies View Related

Android :: Background Image Size?

Feb 2, 2010

I have an image that I want to place on the background on my activity. For the G1 I would use a background of 320x480 but with the nexus 1 the resolution is almost double that. Should I just place the large image and make the smaller phones size down? I am trying to keep the size of my package down as much as possible.

View 1 Replies View Related

Android :: Setting Image As Hyperlink

Dec 9, 2009

I'm facing a problem. I want to show a image as a hyperlink. Touching that image will open the browser and go to given url. This should be in .xml file (not dynamic). Is it possible to do that? If yes, then how? Anyone please give me the code.

View 2 Replies View Related

Android :: Reducing Image File Size

Jun 22, 2009

I want to reduce the size of my image file to transfer it over the network. Do anybody know how can I reduce the file size using andriod APIs.

View 3 Replies View Related

Android :: Trying To Get Display Size Of Image In ImageView

Oct 4, 2010

I'm trying to get the real size of an image displayed in an image view. Actually my image is larger than the screen and the imageview is resizing the image to diplay it. I'm looking for this new size.I've tried to override the onDraw method of the ImageView in a custom view but I'm not getting the correct height and width.

View 8 Replies View Related

Android :: Full Size Image In ImageView

Mar 29, 2010

I'm trying to draw an image in an ImageView, but i want it to be unscaled, with scrollbars as necessary. How can I accomplish this? Right now I just have a drawable set as the android:src of the ImageView in the XML. This autoscales the image to fit the screen width.

View 2 Replies View Related

Android :: SetImageURI Is Changing The Size Of The Image

Sep 15, 2010

I am running into a very weird thing. I have an ImageView, and when I call setImageURI with an image, it seems to change the size of the image view.

CODE:..............

The default image is 195 x 195, i am trying to set the image to be 200 x 200, after setting the image using setImageURI, i get the dimensions back and it says it's 48 x 48.

I have tried a bunch of different android:scaleType parameters, and I couldn't find anything that worked.

I also tried explicitly setting the size (layout_width="200px") and it seems to work.

View 2 Replies View Related

Android :: Activity Image Background Size?

Sep 12, 2010

I am a bit confused on creating an image which will be acting as a background for my activities. So, in short, my aim is that my application should be able to fit the different screen sizes. Therefore, what size in pixel should my three images be to be able to fill the screen of the device in ldpi, mdpi and hdpi?

View 2 Replies View Related

Android : How To Display Image In Different Screen Size?

Oct 5, 2010

I am looking for an optimized solution to display image in different screen size. I have a image in server which I would like to display in different handled devices like iPhone, iPad ,Android based tablets or mobiles etc.

View 1 Replies View Related

Android :: Set Image's Top And Bottom In Same Size For Droid?

Sep 6, 2010

I want to display image in center and top and bottom in same size refer bellow screens,anybody know please give the code to me..

View 1 Replies View Related

Android :: Setting Wallpaper From An Image On SD Card

Jul 8, 2010

How would one go about setting the homescreen wallpaper from an image on the SDcard?

View 1 Replies View Related

Android :: Any Way To Use Image Sizes When Setting View?

Oct 19, 2010

Is there a way to use an image size when setting the sizes of a view? I want to create a TextView item with the exact height of a resource image, but I don't want to use the image as a background for the text view.

View 1 Replies View Related

Android :: Trying To Add Image - Setting Layout Parameters

Jul 21, 2010

So Im trying to add an imageview to my current xml design - and its working decently. Now my main problem is that I cant seem to find a way to set the attributes for the image like where it needs to be displayed etc.

RelativeLayout mRelativeLayout = (RelativeLayout) findViewById(R.id.board);

ImageView i = new ImageView(this);
i.setImageResource(R.drawable.blue_1);
i.setAdjustViewBounds(true);
mRelativeLayout.addView(i);
setContentView(mRelativeLayout);

i tried messing around with setlayoutparams but got absolutely no clue what to do with it.

View 1 Replies View Related

Android :: Setting Text Of Image Button

Aug 31, 2010

In my Android project,I've a image button whose background is set to some image.I want so set some text on the image button.How do i do that?I want to set the text because localization would be used in the project.

View 1 Replies View Related

Android :: Full Size Image With Scroll Ability

Jul 13, 2010

I have an image that I want to be able to display full size but when I place it in my imageview it scales. I would like it to display full size with scroll bars. Is there a way I can make my main view that the image view is in have scroll bars vertical and horizontal or how can I do this. The images are local on the SD card. I would really like to get the same effect that the webview offers if i were to look at these image from a URL.

View 3 Replies View Related

Android :: Use Random Image In It's Original Size As Background?

Jul 5, 2010

I'd like to be able to use an image as my background in a relative layout, without it stretching. I don't want to just enter the images details into an XML file, as I want to use different images, with different sizes. I've tried the following, but it just stretches the images (I know the left, top, right and bottom variables have the wrong values, but I've just entered something into them, as a test to see if it makes any difference to the output, but it does not. If it did, I'd calculate the correct values programmaticly : -

RelativeLayout explosionlayout = (RelativeLayout) findViewById (R.id.explosionlayout);
imageAnim = (ImageView) findViewById(R.id.explosion);
Drawable d;
d = this.getResources().getDrawable(R.drawable.bomb);
int left = 10; int top = 10; int right = 20; int bottom = 20;
d.setBounds(left, top, right, bottom);
explosionlayout.setBackgroundDrawable(d);

View 1 Replies View Related

Android :: Image Size To Design These Mockup Interface In?

Oct 30, 2010

I want to design some mockup interfaces for some Android apps. I would like them to be able to nicely scale up and down depending on the resolution of the mobile device being used.

What would be the best image size to design these mockup interface in?

View 2 Replies View Related

Android :: Droid Shrink Large Image Size / Fix It?

Nov 24, 2010

If there is a image on my phone that I want to send up to a server thats 1mb or higher I want to take that image and shrink it to a smaller size without messing with original image in anyway. I know how to get a from the phone and I also know how to send it up to a server, I just need to know how to make the image smaller because large files higher than 1mb are giving me issues.

View 1 Replies View Related

Android : Fix Image Size(28 X 29 Png File) In GrouptIndicator Of ExpandableListview?

Apr 30, 2010

How to fix the image size(28 x 29 png file) in the grouptIndicator of the ExpandableListview ??? I use expandableListview and android:groupIndicator in the attribute. The png image size is 28x29. But The Imgae is stretched. Does anyone Know this? Any answer is useful for me .

View 3 Replies View Related

HTC Droid Eris :: Want Setting To Increase Font Size Of K9 Email App?

Mar 1, 2010

I've been playing with the K9 Email app as a replacement for the stock program. I rather like it, but there is a deal breaker. On my secondary gmail account (not the one the Eris is set up with, but another one that I set up in K9) the font size in the message is so tiny I can't see it. I've searched the options over and over to find a setting to increase the font size, but apparently I can't find it. Would any of you happen to know where it is?

View 12 Replies View Related

Android :: Setting An Image View Resource As Drawable

May 2, 2010

I am trying to create a drawable in code and change the color based on some criteria. When I try and set the Drawable as the background of the ImageView it displays but won't let me set any padding. I realized I need to set the ImageView image via the setImageDrawable() function in order to be able to set the padding. The problem I am running into is that when I set it via the setImageDrawable() function nothing is displayed.

Here is what I have written:
<?xml version="1.0" encoding="utf-8"?>
ImageView icon = (ImageView) row.findViewById(R.id.icon);
ShapeDrawable mDrawable; int x = 0; int y = 0;
int width = 50; int height = 50;
float[] outerR = new float[] { 12, 12, 12, 12, 12, 12, 12, 12 };
mDrawable = new ShapeDrawable(new RoundRectShape(outerR, null, null));
mDrawable.setBounds(x, y+height, x + width, y);
switch(position){ case 0: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 1: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 2: mDrawable.getPaint().setColor(0xff00c000); //Green break;
case 3: mDrawable.getPaint().setColor(0xff00c000); //Green break;
case 4: mDrawable.getPaint().setColor(0xff0000ff); //Blue break;
case 5: mDrawable.getPaint().setColor(0xff0000ff); //Blue break;
case 6: mDrawable.getPaint().setColor(0xff696969); //Gray break;
case 7: mDrawable.getPaint().setColor(0xff696969); //Gray break;
case 8: mDrawable.getPaint().setColor(0xffffff00); //Yellow break;
case 9: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 10: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 11: mDrawable.getPaint().setColor(0xff8b4513); //Brown break;
case 12: mDrawable.getPaint().setColor(0xffa020f0); //Purple break;
case 13: mDrawable.getPaint().setColor(0xffff0000); //Red break;
case 14: mDrawable.getPaint().setColor(0xffffd700); //Gold break;
case 15: mDrawable.getPaint().setColor(0xffff6600); //Orange break;
} icon.setImageDrawable(mDrawable); icon.setPadding(5, 5, 5, 5);
This results in a space for the ImageView but no image.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved