[android-developers] Re: Image scaling on Sony Ericsson Xperia phone

2018-02-19 Thread anon ymous
Hi Mr Johan, 

I am developing a chat app for my final year project.
So what I am doing is that the image on the sender's phone is being scaled 
down to 20 by 20 sp.
When it reaches the destination i want that image to be scaled up to 100 by 
100 sp.
I had downloaded the code provided 
from 
https://developer.sonymobile.com/2011/06/27/how-to-scale-images-for-your-android-application/
But unfortunately the scaling doesn't work. The images I am saving to the 
database are very very blurry. 
I am using the fit method, not crop.
I am not sure what I am doing wrong. I have been trying to fix my problem 
for the past 3 weeks but its not working.
Please help me. Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/77ebb554-c761-4a75-a53c-2b186cbb190f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image adquisicion app

2016-03-02 Thread gjs
Read http://developer.android.com/training/camera/cameradirect.html

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/b83c3209-ba44-4081-af2e-f8fc82c177f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Image adquisicion app

2016-03-02 Thread Justin Anderson
Try again...

On Tue, Mar 1, 2016 at 7:04 PM developer 
wrote:

> i need acquire image and have control on the flashlight to turn on or turn
> off while i see image of the camera.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/e2bf15bf-8950-4c09-8d96-bf690233d153%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CAOq06s-Cg0kscxM6MAYWsEX37V31C5WeRYOm-7ARP-BvLRgLHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image adquisicion app

2016-03-01 Thread developer
i need acquire image and have control on the flashlight to turn on or turn 
off while i see image of the camera.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/e2bf15bf-8950-4c09-8d96-bf690233d153%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image is being oriented differently once uploaded to server, why?

2015-04-13 Thread catafest
I think it's a stack effect over ftp client ...See the first answer of Matt 
Gibson , from your link tutorial ...
 - Found at this link: 
http://stackoverflow.com/questions/24629584/image-orientation-changes-while-uploading-image-to-server
 
... 
http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24629584%2Fimage-orientation-changes-while-uploading-image-to-serversa=Dsntz=1usg=AFQjCNH6Q3idbwXFE30Hv7wZ5pJ6YRX_hg
http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24629584%2Fimage-orientation-changes-while-uploading-image-to-serversa=Dsntz=1usg=AFQjCNH6Q3idbwXFE30Hv7wZ5pJ6YRX_hg
also you need to set the property of image, also will be set by default - 
and size .

On Sunday, April 12, 2015 at 8:00:41 AM UTC+3, Dan Cha wrote:

 So within my app, i have the ability to allow the user to take a pic, see 
 a thumbnail within the app and once the form is submitted, its uploaded to 
 the server.





-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Re: Image is being oriented differently once uploaded to server, why?

2015-04-13 Thread Daniel Chacon
Yea that i had found and attempted to implement within my existing code,
but everything works fine within the phone/device, but not when uploaded.

int rotate = 0;
try {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 10;
getContentResolver().notifyChange(fileUri, null);
File imageFile = new File(fileUri.getPath());
ExifInterface exif = new
ExifInterface(imageFile.getAbsolutePath());
int orientation = exif.getAttributeInt(
ExifInterface.TAG_ORIENTATION,
ExifInterface.ORIENTATION_NORMAL);

switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_270:
rotate = 270;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
rotate = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_90:
rotate = 90;
break;
}

final Bitmap bitmap =
BitmapFactory.decodeFile(fileUri.getPath(),options);
Matrix matrix = new Matrix();
matrix.postRotate(rotate);
Bitmap rotImage = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), matrix,true);
imgThumb.setImageBitmap(rotImage);
}
catch (Exception e)
{
e.printStackTrace();
}

On Mon, Apr 13, 2015 at 1:21 AM, catafest catalinf...@gmail.com wrote:

 I think it's a stack effect over ftp client ...See the first answer of
 Matt Gibson , from your link tutorial ...
  - Found at this link: http://stackoverflow.com/questions/24629584/image-
 orientation-changes-while-uploading-image-to-server ...
 http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24629584%2Fimage-orientation-changes-while-uploading-image-to-serversa=Dsntz=1usg=AFQjCNH6Q3idbwXFE30Hv7wZ5pJ6YRX_hg

 http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24629584%2Fimage-orientation-changes-while-uploading-image-to-serversa=Dsntz=1usg=AFQjCNH6Q3idbwXFE30Hv7wZ5pJ6YRX_hg
 also you need to set the property of image, also will be set by default -
 and size .

 On Sunday, April 12, 2015 at 8:00:41 AM UTC+3, Dan Cha wrote:

 So within my app, i have the ability to allow the user to take a pic, see
 a thumbnail within the app and once the form is submitted, its uploaded to
 the server.



  --
 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
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image is being oriented differently once uploaded to server, why?

2015-04-12 Thread Doug Gordon
I've seen this happen in a number of places when uploading images. The 
basic issue is that there are two ways to save a rotated image: save the 
raster data in the correct orientation and without metadata, or save the 
raster data in its native orientation and set the metadata value to 
indicate the desired rotation. The problem is that some software 
implementations still do not look at the metadata field and just display 
the raw raster image. So the photo may appear rotated correctly in one 
place and not rotated in another!


On Sunday, April 12, 2015 at 1:00:41 AM UTC-4, Dan Cha wrote:

 So within my app, i have the ability to allow the user to take a pic, see 
 a thumbnail within the app and once the form is submitted, its uploaded to 
 the server.

 But something ive noticed lately is that (since im storing the image taken 
 in the users gallery within a folder specific to the app) if you view the 
 pic outside the app in the actually folder, it looks oriented correctly, if 
 i take it portrait its portrait, if i take the pic landscape, its stored in 
 landscape.

 Also when the user is presented the thumbnail, it also shows correct, but 
 for some reason when the image is uploaded to the server, it no longer has 
 the correct orientation.

 Im using ftp to upload the image with this code:

 try
 {
 int reply;
 String reply2;
 ftpClient.connect(ftp.site.com);
 ftpClient.login(site,pass);
 ftpClient.changeWorkingDirectory(/imgs/);
 ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
 BufferedInputStream buffIn = null;
 buffIn = new BufferedInputStream(new 
 FileInputStream(file));
 ftpClient.enterLocalPassiveMode();
 ftpClient.storeFile(destinFolder,buffIn);
 buffIn.close();
 reply = ftpClient.getReplyCode();
 if(!FTPReply.isPositiveCompletion(reply))
 {
 ftpClient.disconnect();
 }
 ftpClient.logout();
 }

 I even changed my logic to this and still nothing, the image is always 
 uploaded in landscape. Even though the thumbnail and stored image on the 
 phone is portrait.
 Found at this link: 
 http://stackoverflow.com/questions/24629584/image-orientation-changes-while-uploading-image-to-server


   int rotate = 0;
 try {
 getContentResolver().notifyChange(imageUri, null);
 File imageFile = new File(al_image_paths.get(i)); 
 ExifInterface exif = new ExifInterface(
 imageFile.getAbsolutePath());
 int orientation = exif.getAttributeInt(
 ExifInterface.TAG_ORIENTATION,
 ExifInterface.ORIENTATION_NORMAL);

 switch (orientation) {
 case ExifInterface.ORIENTATION_ROTATE_270:
 rotate = 270;
 break;
 case ExifInterface.ORIENTATION_ROTATE_180:
 rotate = 180;
 break;
 case ExifInterface.ORIENTATION_ROTATE_90:
 rotate = 90;
 break;
 }
 Log.v(Common.TAG, Exif orientation:  + orientation);

 Bitmap rotattedBitmap= BitmapFactory.decodeFile(al_image_paths.get(i));   
 
 Matrix matrix = new Matrix();
 matrix.postRotate(rotate);
 return Bitmap.createBitmap(rotattedBitmap, 0, 0, 
 rotattedBitmap.getWidth(), rotattedBitmap.getHeight(), matrix,   true);
 } catch (Exception e) {
 e.printStackTrace();
 }



-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image is being oriented differently once uploaded to server, why?

2015-04-11 Thread Dan Cha
Can someone tell me if this line in the code actually rewrites the image 
with the new settings or is this merely in memory and not touching the 
original image.. 

It would be great to fix the orientation and resize the image before being 
stored, so that the upload image is already the appropriate file size.


On Sunday, April 12, 2015 at 12:00:41 AM UTC-5, Dan Cha wrote:

 So within my app, i have the ability to allow the user to take a pic, see 
 a thumbnail within the app and once the form is submitted, its uploaded to 
 the server.

 But something ive noticed lately is that (since im storing the image taken 
 in the users gallery within a folder specific to the app) if you view the 
 pic outside the app in the actually folder, it looks oriented correctly, if 
 i take it portrait its portrait, if i take the pic landscape, its stored in 
 landscape.

 Also when the user is presented the thumbnail, it also shows correct, but 
 for some reason when the image is uploaded to the server, it no longer has 
 the correct orientation.

 Im using ftp to upload the image with this code:

 try
 {
 int reply;
 String reply2;
 ftpClient.connect(ftp.site.com);
 ftpClient.login(site,pass);
 ftpClient.changeWorkingDirectory(/imgs/);
 ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
 BufferedInputStream buffIn = null;
 buffIn = new BufferedInputStream(new 
 FileInputStream(file));
 ftpClient.enterLocalPassiveMode();
 ftpClient.storeFile(destinFolder,buffIn);
 buffIn.close();
 reply = ftpClient.getReplyCode();
 if(!FTPReply.isPositiveCompletion(reply))
 {
 ftpClient.disconnect();
 }
 ftpClient.logout();
 }

 I even changed my logic to this and still nothing, the image is always 
 uploaded in landscape. Even though the thumbnail and stored image on the 
 phone is portrait.
 Found at this link: 
 http://stackoverflow.com/questions/24629584/image-orientation-changes-while-uploading-image-to-server


   int rotate = 0;
 try {
 getContentResolver().notifyChange(imageUri, null);
 File imageFile = new File(al_image_paths.get(i)); 
 ExifInterface exif = new ExifInterface(
 imageFile.getAbsolutePath());
 int orientation = exif.getAttributeInt(
 ExifInterface.TAG_ORIENTATION,
 ExifInterface.ORIENTATION_NORMAL);

 switch (orientation) {
 case ExifInterface.ORIENTATION_ROTATE_270:
 rotate = 270;
 break;
 case ExifInterface.ORIENTATION_ROTATE_180:
 rotate = 180;
 break;
 case ExifInterface.ORIENTATION_ROTATE_90:
 rotate = 90;
 break;
 }
 Log.v(Common.TAG, Exif orientation:  + orientation);

 Bitmap rotattedBitmap= BitmapFactory.decodeFile(al_image_paths.get(i));   
 
 Matrix matrix = new Matrix();
 matrix.postRotate(rotate);
 return Bitmap.createBitmap(rotattedBitmap, 0, 0, 
 rotattedBitmap.getWidth(), rotattedBitmap.getHeight(), matrix,   true);
 } catch (Exception e) {
 e.printStackTrace();
 }



-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image view and then a grid view - make them all scrollable

2014-08-01 Thread Vrunda
You can scroll top image in horizontal, by using Scrollview Horizontal, if 
there is multiple image at top.

On Monday, 28 July 2014 21:56:04 UTC+5:30, sweety fx wrote:

 I have an image view on top and then grid view.
 I want all both the image view and grid view scrollable together, but only 
 the grid view is scrolls.
 Is there a way to implement it?


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Doug Gordon
This may not be related to your problem, but I believe that there are 
basically two ways that the orientation of a JPEG photo is determined. One 
is simply by the way the actual data in the file is laid out; for example, 
whether it is stored as 1024x768 or 768x1024. The other determinate is an 
(optional) datum in the file's metadata that specifies camera 
orientation and indicates the degrees of rotation. So even if a photo's 
data is stored as 1024x768, if the orientation data is +90, then it is to 
be displayed rotated to the right in 768x1024 format.

The problem that I've found is that not all devices or image 
processing/display software seems to use the metadata and, making things 
worse, may not propagate the data when saving a modified image. So I've had 
photos from my phone that I've had to rotate in image software to make them 
look right on my PC, but then I'll do something like upload them to 
Facebook and they're rotated the wrong way!

I might be wrong about this, but it's what I've concluded after playing 
around with various devices and image processing programs.

On Tuesday, March 25, 2014 2:07:37 AM UTC-4, Jags wrote:

 Hi All,

 I tried to capture an image and send it to server in my app. I did that 
 using camera intent. the problem is in my samsung galaxy s4 device the 
 image is rotated -90 degree by default. I read around web that it is a 
 problem with the samsung devices. But what is the best solution to it ? if 
 i rotate the image after capture, it becomes heavy image processing in my 
 app. What is the best approach to resolve this ? 

 in phonegap there is something like correctOrientation = true / false 
 what's its counterpart in native code ?

 thanks and regards
 jags


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Image captured from my app is rotated by default

2014-03-25 Thread Nobu Games
This is expected behavior, and Doug's assumption is right. JPEG images may 
contain EXIF http://en.wikipedia.org/wiki/Exchangeable_image_file_formatdata 
blocks that also specify the orientation of the image. On your server 
you need to read the orientation data and use it to rotate the image into 
the opposite direction. If your server code is written in PHP you can use 
the Imagick library and the following functions for determining the 
orientation and rotating the image 
respectively:Imagick::getImageOrientation()http://www.php.net/manual/en/imagick.getimageorientation.php,
 
Imagick::rotateImage()http://www.php.net/manual/en/imagick.rotateimage.php
.
If the server software is written in Java you could use a library such as 
Metadata-Extractor http://code.google.com/p/metadata-extractor/ for 
reading the orientation and any image processing library of your choice for 
rotating the image.


On Tuesday, March 25, 2014 1:07:37 AM UTC-5, Jags wrote:

 Hi All,

 I tried to capture an image and send it to server in my app. I did that 
 using camera intent. the problem is in my samsung galaxy s4 device the 
 image is rotated -90 degree by default. I read around web that it is a 
 problem with the samsung devices. But what is the best solution to it ? if 
 i rotate the image after capture, it becomes heavy image processing in my 
 app. What is the best approach to resolve this ? 

 in phonegap there is something like correctOrientation = true / false 
 what's its counterpart in native code ?

 thanks and regards
 jags


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: image not coming proper some times lazy loading grid view

2013-12-04 Thread Streets Of Boston
Not sure if this would work, but may be worth a try:

Before you close the FileOutputStream 'fs', have you tried to call 
fs.getFD(),sync() ?

On Wednesday, December 4, 2013 3:00:43 AM UTC-5, Amit Mangal wrote:

 Hi there,
 i am loading images on grid view using lazy loading from network. problem 
 is not some times image is not coming properly i have attached the screen 
 shot.

 here is my lazy loading code 

 private Bitmap getBitmap(String url) 
 {
 File f=fileCache.getFile(url);
 
 Bitmap b = showImage(f);
 if(b!=null)
 return b;
 
 //from web
 try {
 Bitmap bitmap=null;
 URL imageUrl = new URL(url);
 HttpURLConnection conn = 
 (HttpURLConnection)imageUrl.openConnection();
 conn.setConnectTimeout(6);
 conn.setReadTimeout(6);
 conn.setInstanceFollowRedirects(true);
 InputStream is=conn.getInputStream();
 OutputStream os = new FileOutputStream(f);
 Utils.CopyStream(is, os);
 os.close();
 //bitmap = decodeFile(f);
 bitmap =  showImage(f); 
 return bitmap;
 } catch (Throwable ex){
ex.printStackTrace();
if(ex instanceof OutOfMemoryError)
memoryCache.clear();
return null;
 }
 }
 
 private Bitmap showImage(File file)   {
 //Log.i(showImage,loading:+path);
 BitmapFactory.Options bfOptions=new BitmapFactory.Options();
 bfOptions.inDither=false; //Disable Dithering 
 mode
 bfOptions.inPurgeable=true;   //Tell to gc that 
 whether it needs free memory, the Bitmap can be cleared
 bfOptions.inInputShareable=true;  //Which kind of 
 reference will be used to recover the Bitmap data after being clear, when 
 it will be used in the future
 bfOptions.inTempStorage=new byte[32 * 1024]; 


 //File file=new File(path);
 FileInputStream fs=null;
 try {
 fs = new FileInputStream(file);
 } catch (FileNotFoundException e) {
 //TODO do something intelligent
 e.printStackTrace();
 }

 Bitmap bm = null ;
 try {
 if(fs!=null) bm 
 =BitmapFactory.decodeFileDescriptor(fs.getFD(), null, bfOptions);
 } catch (IOException e) {
 //TODO do something intelligent
 e.printStackTrace();
 } finally{ 
 if(fs!=null) {
 try {
 fs.close();
 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }
 }
 }
 //bm=BitmapFactory.decodeFile(path, bfOptions); This one causes 
 error: java.lang.OutOfMemoryError: bitmap size exceeds VM budget

   //  im.setImageBitmap(bm);
 //bm.recycle();
  //   bm=null;
  return bm ;


 }


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Image to Video Converter In android

2013-08-02 Thread bobbybrend
Videos are encoded in many different formats for different devices and it 
is necessary to convert your videos to a format compatible with the Android 
operating system. Professional video conversion applications are expensive, 
but there are many free programs available for Macintosh and Windows 
operating systems that can convert your videos to play on Android mobile 
devices.
http://www.recovery-android.com/android-video-converter.html
http://www.recovery-android.com/convert-video-to-android.html

在 2012年4月9日星期一UTC+8下午3时52分56秒,Arun写道:

 hello all, 

 I want to convert a sequence of images in to video file in android. 
 and wants to share the file on facebook.  i had done lots of RD and 
 uses FFmpeg library for the same, But no success. 

 please help me. 
 and id anyone have working code please provide me.. i am in deep 
 trouble. 

 Thanks 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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: image issue while view it as base64 in android mobile2.3

2013-03-18 Thread senthil kumar
Store the image as base64 in sqlite browser but we are not able to see the 
5 or 6 image.
In samasung galaxy y we only see  2 image which we store.In Lemon mobile we 
only see 2 or 4 images.
In micromax only to see 5 or 6 image after that all image we took is seen 
as black screen we don't know why it happening..

On Thursday, March 14, 2013 9:47:24 AM UTC+5:30, senthil kumar wrote:

 Hi,
Using phone and javascript in our application. we want to see the image 
 as base64 from the sqlite db.
 In some mobile all the image(i.e 4 or 5) are viewed but in some mobile 
 some of the image(even 1 is not displayed) are not viewed we do not know 
 why it happening...
 is it due to memory? Please explain , if any know about this issue...


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: image issue while view it as base64 in android mobile2.3

2013-03-14 Thread bob
 

I would try storing the image as a BLOB instead of base64.


Thanks.



On Wednesday, March 13, 2013 11:17:24 PM UTC-5, senthil kumar wrote:

 Hi,
Using phone and javascript in our application. we want to see the image 
 as base64 from the sqlite db.
 In some mobile all the image(i.e 4 or 5) are viewed but in some mobile 
 some of the image(even 1 is not displayed) are not viewed we do not know 
 why it happening...
 is it due to memory? Please explain , if any know about this issue...


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Image Gallery

2013-03-11 Thread Piren
ffs: http://developer.android.com/training/displaying-bitmaps/index.html

On Monday, March 11, 2013 11:16:48 AM UTC+2, Ambika Kulkarni wrote:

 Dear Folks,

 I am a new bee to Android. I want to create a Image Gallery. With Next and 
 PRevious buttons.I want to have this image sclaed with full screen.  I am 
 able to create a Grid View Image Gallery. For this I am displaying the 
 images from the server. For server side I have written PHP script and it is 
 returing a JSON string which contains the image name. At the client side I 
 am itearating this and showing in  a grid view. Same thing I want to do 
 with a I age Gallery where 1 after the other image comes on click of Next 
 and Prev button.

 I have searched in the net, but dint get a proper working code for it. Can 
 someone help me out.


 Thanks And Regards
 Ambika


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Image background (not 9-patch) for an AppWidget

2012-12-05 Thread Mário César Mancinelli de Araújo
I created a file digital_clock_background.xml (inside res/drawable) and put 
this code:

?xml version=1.0 encoding=utf-8?
shape xmlns:android=http://schemas.android.com/apk/res/android;
android:padding=10dp
android:shape=rectangle 

solid android:color=#00 /

stroke
android:width=2dp
android:color=#00 /

padding
android:bottom=1dp
android:left=1dp
android:right=1dp
android:top=1dp /

corners android:radius=10dp /

/shape

So my AppWidget layout is basically:

?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/rllWidgetBigger
android:layout_width=match_parent
android:layout_height=match_parent
android:layout_margin=@dimen/widget_margin
android:background=@drawable/digital_clock_background 

ImageView
android:id=@+id/imgBackGroundBigger
android:layout_width=fill_parent
android:layout_height=fill_parent
android:layout_alignParentBottom=true
android:layout_alignParentLeft=true
android:layout_alignParentRight=true
android:layout_alignParentTop=true
android:contentDescription=@string/app_name
android:scaleType=centerCrop
android:src=@drawable/digital_andromeda_galaxy_m31 /

/RelativeLayout

And, well, the RelativeLayout now have rounded corners, but the ImageView 
doesn't. And it's corners are coming out of the RelativeLayout...

Is there anyway to correct it (without putting more padding)?

Thanks!

Em terça-feira, 4 de dezembro de 2012 00h19min37s UTC-2, Mário César 
Mancinelli de Araújo escreveu:

 Hi everyone.

 It's really not a code issue, but a layout one. So, if anyone could help 
 me, it would be nice.

 The thing is that I'm gonna have to use an image, an picture, as 
 background for an AppWidget. So, basically, I'm gonna use an ImageView to 
 show the image, setting the scale type to CENTER_CROP. Everything else 
 (TextViews and so on) go on top of that.

 The problem is that I will need to show a border in the AppWidget, with 
 rounded corners. So, what's the best way of doing that? The only way I can 
 think of is to use a black 9-patch as background of the RelativeLayout 
 (were the ImageView is going to be inside of) and set a small padding to 
 it... But I don't know if it's going to be good enough...

 So... Any ideas?

 Thanks 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

Re: [android-developers] Re: Image background (not 9-patch) for an AppWidget

2012-12-05 Thread vinay kumar
Hi,

They are number of solution available online but one of them is to recreate
a your bitmap with rounded corners.


public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, int pixels) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap
.getHeight(), Config.ARGB_);
Canvas canvas = new Canvas(output);

final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
bitmap.getHeight());
final RectF rectF = new RectF(rect);
final float roundPx = pixels;

paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);

paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);

return output;
}


Hope this helps!

On Wed, Dec 5, 2012 at 7:30 PM, Mário César Mancinelli de Araújo 
mandaproma...@gmail.com wrote:

 I created a file digital_clock_background.xml (inside res/drawable) and
 put this code:

 ?xml version=1.0 encoding=utf-8?
 shape xmlns:android=http://schemas.android.com/apk/res/android;
 android:padding=10dp
 android:shape=rectangle 

 solid android:color=#00 /

 stroke
 android:width=2dp
 android:color=#00 /

 padding
 android:bottom=1dp
 android:left=1dp
 android:right=1dp
 android:top=1dp /

 corners android:radius=10dp /

 /shape

 So my AppWidget layout is basically:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/rllWidgetBigger
 android:layout_width=match_parent
 android:layout_height=match_parent
 android:layout_margin=@dimen/widget_margin
 android:background=@drawable/digital_clock_background 

 ImageView
 android:id=@+id/imgBackGroundBigger
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:layout_alignParentBottom=true
 android:layout_alignParentLeft=true
 android:layout_alignParentRight=true
 android:layout_alignParentTop=true
 android:contentDescription=@string/app_name
 android:scaleType=centerCrop
 android:src=@drawable/digital_andromeda_galaxy_m31 /

 /RelativeLayout

 And, well, the RelativeLayout now have rounded corners, but the ImageView
 doesn't. And it's corners are coming out of the RelativeLayout...

 Is there anyway to correct it (without putting more padding)?

 Thanks!

 Em terça-feira, 4 de dezembro de 2012 00h19min37s UTC-2, Mário César
 Mancinelli de Araújo escreveu:

 Hi everyone.

 It's really not a code issue, but a layout one. So, if anyone could help
 me, it would be nice.

 The thing is that I'm gonna have to use an image, an picture, as
 background for an AppWidget. So, basically, I'm gonna use an ImageView to
 show the image, setting the scale type to CENTER_CROP. Everything else
 (TextViews and so on) go on top of that.

 The problem is that I will need to show a border in the AppWidget, with
 rounded corners. So, what's the best way of doing that? The only way I can
 think of is to use a black 9-patch as background of the RelativeLayout
 (were the ImageView is going to be inside of) and set a small padding to
 it... But I don't know if it's going to be good enough...

 So... Any ideas?

 Thanks 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


-- 
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

Re: [android-developers] Re: Image background (not 9-patch) for an AppWidget

2012-12-05 Thread Mário César Mancinelli de Araújo
Not really... First of all, how do I discover the value of pixels?
Because it depends on the Android version, on the manufacture of the
equipament... And, most important, I don't have access to the ImageView (I
can set properties, but not get because of the RemoteViews).

Other thing is that the format (if it is a rectangle or a square) will
depend on the AppWidget's minHeight and minWidth. And the images are square
and I set scale type to center crop.

So... I really don't know if it's possible to solve the problem like this.
:/

But thanks anyway. ;)
Em 06/12/2012 04:30, vinay kumar vk872...@gmail.com escreveu:

 Hi,

 They are number of solution available online but one of them is to
 recreate a your bitmap with rounded corners.


 public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, int pixels) {
 Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap
 .getHeight(), Config.ARGB_);
 Canvas canvas = new Canvas(output);

 final int color = 0xff424242;
 final Paint paint = new Paint();
 final Rect rect = new Rect(0, 0, bitmap.getWidth(),
 bitmap.getHeight());
 final RectF rectF = new RectF(rect);
 final float roundPx = pixels;

 paint.setAntiAlias(true);
 canvas.drawARGB(0, 0, 0, 0);
 paint.setColor(color);
 canvas.drawRoundRect(rectF, roundPx, roundPx, paint);

 paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
 canvas.drawBitmap(bitmap, rect, rect, paint);

 return output;
 }


 Hope this helps!

 On Wed, Dec 5, 2012 at 7:30 PM, Mário César Mancinelli de Araújo 
 mandaproma...@gmail.com wrote:

 I created a file digital_clock_background.xml (inside res/drawable) and
 put this code:

 ?xml version=1.0 encoding=utf-8?
 shape xmlns:android=http://schemas.android.com/apk/res/android;
 android:padding=10dp
 android:shape=rectangle 

 solid android:color=#00 /

 stroke
 android:width=2dp
 android:color=#00 /

 padding
 android:bottom=1dp
 android:left=1dp
 android:right=1dp
 android:top=1dp /

 corners android:radius=10dp /

 /shape

 So my AppWidget layout is basically:

 ?xml version=1.0 encoding=utf-8?
 RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
 
 android:id=@+id/rllWidgetBigger
 android:layout_width=match_parent
 android:layout_height=match_parent
 android:layout_margin=@dimen/widget_margin
 android:background=@drawable/digital_clock_background 

 ImageView
 android:id=@+id/imgBackGroundBigger
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:layout_alignParentBottom=true
 android:layout_alignParentLeft=true
 android:layout_alignParentRight=true
 android:layout_alignParentTop=true
 android:contentDescription=@string/app_name
 android:scaleType=centerCrop
 android:src=@drawable/digital_andromeda_galaxy_m31 /

 /RelativeLayout

 And, well, the RelativeLayout now have rounded corners, but the ImageView
 doesn't. And it's corners are coming out of the RelativeLayout...

 Is there anyway to correct it (without putting more padding)?

 Thanks!

 Em terça-feira, 4 de dezembro de 2012 00h19min37s UTC-2, Mário César
 Mancinelli de Araújo escreveu:

 Hi everyone.

 It's really not a code issue, but a layout one. So, if anyone could help
 me, it would be nice.

 The thing is that I'm gonna have to use an image, an picture, as
 background for an AppWidget. So, basically, I'm gonna use an ImageView to
 show the image, setting the scale type to CENTER_CROP. Everything else
 (TextViews and so on) go on top of that.

 The problem is that I will need to show a border in the AppWidget, with
 rounded corners. So, what's the best way of doing that? The only way I can
 think of is to use a black 9-patch as background of the RelativeLayout
 (were the ImageView is going to be inside of) and set a small padding to
 it... But I don't know if it's going to be good enough...

 So... Any ideas?

 Thanks 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


  --
 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

-- 
You received this message because you are subscribed to the Google
Groups Android 

[android-developers] Re: image view on Customized dialog box

2012-11-22 Thread Piren
not sure why you're using the .Show() method, its best to use 
onCreateDialog for custom dialogs as well.

but either way, ASyncTasks dont run onPostExecute on the UI thread 
automatically, the run it on the thread the ASyncTask was created in.
To avoid your issue either add a Handler to run the onPostExecute code on 
or try and using  runOnUiThread 

On Thursday, November 22, 2012 3:37:44 PM UTC+2, Mr cool wrote:

 I have one problem with customized dialog box in android,i have created 
 the customized dialog using javainterface in android ,in my class 
 CustomizeDialog i have one thread do some process in back ground after that 
 i have set one imgae to this customized dialog i set the image in 
 OnPostExecute but i got the following error

 android.view.ViewRootImpl$CalledFromWrongThreadException: Only the 
 original thread that created a view hierarchy can touch its views.
  i know we can't access the main ui from another thread but we access the 
 main ui in OnPostExecuted in my case that also not working ,
 in my another class(main.class) i will call this class by
  CustomizeDialog customizeDialog = new CustomizeDialog(mContext);
 customizeDialog.show();

 this my code which create dialog box

 public class CustomizeDialog extends Dialog implements OnClickListener 
 {
 Button okButton;
 ImageView img = null;
 ImageView img2=null;
 ImageView img3 = null;
 ImageView img4= null;
  Bitmap bm;
 
 public CustomizeDialog(Context context) {
 super(context);
 
 img2 = (ImageView) findViewById(R.id.imageView1);
 img3 = (ImageView) findViewById(R.id.imageView3);
 img4 = (ImageView) findViewById(R.id.imageView4);
  
 WindowManager.LayoutParams params = getWindow().getAttributes();  
 params.x = 30;  
 params.height = 500;  
 params.width = 500;  
 params.y = 50;  
 
 this.getWindow().setAttributes(params);  
 
 setContentView(R.layout.test);
 img = (ImageView) findViewById(R.id.imageView2);
 
 img.setBackgroundResource(R.drawable.sample);
 
 AnimationDrawable frameAnimation = (AnimationDrawable) 
 img.getBackground();
 
  //Start the animation (looped playback by default).
  frameAnimation.start();
 
 new LongOperation1(context).execute();
  
 }
 
 else
 {
 Toast toast = Toast.makeText(getContext(), Erorr,
 Toast.LENGTH_SHORT);
 toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
 toast.show();
 } }
 
 private class LongOperation1 extends AsyncTaskString, String, String 
 {
 
 @Override
 protected String doInBackground(String... params) {
  //here i do some process
 return Executed;
 }
 
 @Override
 protected void onPostExecute(String result) {
   
  // here i do some process to get bm

 img2.setImageBitmap(bm);
 }
 
 @Override
 protected void onPreExecute() {
 }
 @Override
 protected void onProgressUpdate(String... values) {
 }
 }

 do any have idea about how to do this


-- 
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

Re: [android-developers] Re: image view on Customized dialog box

2012-11-22 Thread ponnu swamy
but how can i use runOnUiThread  method because i extend my customized
dialog class from dialog class not from activity

-- 
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

Re: [android-developers] Re: image view on Customized dialog box

2012-11-22 Thread Piren
It's a view, it can get the activity.

On Thursday, November 22, 2012 4:24:33 PM UTC+2, Mr cool wrote:

 but how can i use runOnUiThread  method because i extend my customized 
 dialog class from dialog class not from activity



-- 
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

[android-developers] Re: image passing ?

2012-09-30 Thread skink


mohammed Nuhail wrote:
 How to send a image from one activity to another activity ?

in extras as a Parcelable?

pskink

-- 
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


Re: [android-developers] Re: image passing ?

2012-09-30 Thread mohammed Nuhail
can i send jpeg image ?

On Sun, Sep 30, 2012 at 4:32 PM, skink psk...@gmail.com wrote:



 mohammed Nuhail wrote:
  How to send a image from one activity to another activity ?

 in extras as a Parcelable?

 pskink

 --
 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


-- 
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

Re: [android-developers] Re: image passing ?

2012-09-30 Thread skink


mohammed Nuhail wrote:
 can i send jpeg image ?



if you have any image in your filesystem then send its Uri, otherwise
if you have in-memory bitmap pass it as a Parcelable

pskink

-- 
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


Re: [android-developers] Re: image passing ?

2012-09-30 Thread vinay kumar
Where does this jpeg images exists?

On Sun, Sep 30, 2012 at 4:51 PM, mohammed Nuhail nuhail...@gmail.comwrote:

 can i send jpeg image ?


 On Sun, Sep 30, 2012 at 4:32 PM, skink psk...@gmail.com wrote:



 mohammed Nuhail wrote:
  How to send a image from one activity to another activity ?

 in extras as a Parcelable?

 pskink

 --
 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


  --
 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


-- 
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

[android-developers] Re: Image Capture

2012-07-31 Thread sham gowda
Dude can you mail me the source code to capture images and to store in SD 
card plz 

On Friday, 12 June 2009 20:11:17 UTC+5:30, hanged_man wrote:

 i've written a class to capture an image and save it to the SD card, 
 if you wish to take a look at it, PM me and id be more than willing to 
 send you the source code

-- 
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

Re: [android-developers] Re: Image Capture

2012-07-31 Thread Raghav Sood

 Dude can you mail me the source code to capture images and to store in SD
 card plz


How much are you paying me?

Thanks

-- 
Raghav Sood
Please do not email private questions to me as I do not have time to answer
them. Instead, post them to public forums where others and I can answer and
benefit from them.
http://www.appaholics.in/ - Founder
http://www.apress.com/9781430239451 - Author
+91 81 303 77248

-- 
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

[android-developers] Re: image show with zoom/pan

2012-07-02 Thread guich
nobody?

-- 
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

RE: [android-developers] Re: image show with zoom/pan

2012-07-02 Thread Tommy Hartz
http://bit.ly/NqThF7

 

not that hard was it..

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of guich
Sent: Monday, July 02, 2012 8:33 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: image show with zoom/pan

 

nobody? 

-- 
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

-- 
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

[android-developers] Re: Image Processing library

2012-04-16 Thread Farhan Tariq
I am looking for something like this   itunes.apple.com/us/app/*fatbooth*
/id372268904?mt=8

On Mon, Apr 16, 2012 at 6:01 PM, Farhan Tariq farhan@gmail.com wrote:

 Hi,

 I am required to make an application that takes picture from camera and
 modify the picture. I wanted to know if there are good android-compatible
 image processing libraries out there that someone here has used. Also I
 would like someone to tell me what KEYWORDS should i look into to be able
 to make the application. I want to add glasses to a picture of a person
 taken with camera. Any help is appreciated.

 Regards,

 Farhan


-- 
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

Re: [android-developers] Re: Image Processing library

2012-04-16 Thread David Olsson
Take a look at OpenCV for Android:
http://code.opencv.org/projects/opencv/wiki/OpenCV4Android

On Mon, Apr 16, 2012 at 3:02 PM, Farhan Tariq farhan@gmail.com wrote:

 I am looking for something like this   itunes.apple.com/us/app/*fatbooth
 */id372268904?mt=8


 On Mon, Apr 16, 2012 at 6:01 PM, Farhan Tariq farhan@gmail.comwrote:

 Hi,

 I am required to make an application that takes picture from camera and
 modify the picture. I wanted to know if there are good android-compatible
 image processing libraries out there that someone here has used. Also I
 would like someone to tell me what KEYWORDS should i look into to be able
 to make the application. I want to add glasses to a picture of a person
 taken with camera. Any help is appreciated.

 Regards,

 Farhan


  --
 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


-- 
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

Re: [android-developers] Re: Image Processing library

2012-04-16 Thread anuragpratap singh
Hi Farhan

I guess, the application that you want to create is already present in the
new android version 4.0 (ICS). this effect is known as live effects and
this effect works for both still capture and video record. Please check *Live
Effects* on android site.

Thanks and Regards
Anurag

On Mon, Apr 16, 2012 at 6:41 PM, David Olsson zooklu...@gmail.com wrote:

 Take a look at OpenCV for Android:
 http://code.opencv.org/projects/opencv/wiki/OpenCV4Android


 On Mon, Apr 16, 2012 at 3:02 PM, Farhan Tariq farhan@gmail.comwrote:

 I am looking for something like this   itunes.apple.com/us/app/*
 fatbooth*/id372268904?mt=8


 On Mon, Apr 16, 2012 at 6:01 PM, Farhan Tariq farhan@gmail.comwrote:

 Hi,

 I am required to make an application that takes picture from camera and
 modify the picture. I wanted to know if there are good android-compatible
 image processing libraries out there that someone here has used. Also I
 would like someone to tell me what KEYWORDS should i look into to be able
 to make the application. I want to add glasses to a picture of a person
 taken with camera. Any help is appreciated.

 Regards,

 Farhan


  --
 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


  --
 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




-- 
Thanks  Regards
Anurag Pratap Singh
(09818909113)
Hughes Systique Corporation

-- 
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

Re: [android-developers] Re: Image Processing library

2012-04-16 Thread Farhan Tariq
It may be present, but I would like to learn how to apply the same or
similar effects to pictures myself. Once I have learnt it, I might be able
to put in more creativity into it.

On Mon, Apr 16, 2012 at 10:27 PM, anuragpratap singh
anurag1...@gmail.comwrote:

 Hi Farhan

 I guess, the application that you want to create is already present in the
 new android version 4.0 (ICS). this effect is known as live effects and
 this effect works for both still capture and video record. Please check *Live
 Effects* on android site.

 Thanks and Regards
 Anurag


 On Mon, Apr 16, 2012 at 6:41 PM, David Olsson zooklu...@gmail.com wrote:

 Take a look at OpenCV for Android:
 http://code.opencv.org/projects/opencv/wiki/OpenCV4Android


 On Mon, Apr 16, 2012 at 3:02 PM, Farhan Tariq farhan@gmail.comwrote:

 I am looking for something like this   itunes.apple.com/us/app/*
 fatbooth*/id372268904?mt=8


 On Mon, Apr 16, 2012 at 6:01 PM, Farhan Tariq farhan@gmail.comwrote:

 Hi,

 I am required to make an application that takes picture from camera and
 modify the picture. I wanted to know if there are good android-compatible
 image processing libraries out there that someone here has used. Also I
 would like someone to tell me what KEYWORDS should i look into to be able
 to make the application. I want to add glasses to a picture of a person
 taken with camera. Any help is appreciated.

 Regards,

 Farhan


  --
 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


  --
 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




 --
 Thanks  Regards
 Anurag Pratap Singh
 (09818909113)
 Hughes Systique Corporation

  --
 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


-- 
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

[android-developers] Re: Image to Video Converter In android

2012-04-12 Thread Giuseppe
Hi Arun,
I am looking for similar solution but not for facebook, did you found a way?

-- 
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

[android-developers] Re: Image to Video Converter In android

2012-04-09 Thread Arun
Dear Nagaraj,

My requirement is differnt, i had created a slideshow of images and
now i want to share, and for that reson i think to convert slideshow
into video and share it,

What you think, is this the Right way to do this.

Thanks for your reply, n waiting for another.

Regards
Arun


On Apr 9, 1:07 pm, nagaraj attimani nagaraj.attim...@gmail.com
wrote:
 Dear Arun,

 First you need to convert Image to YUV format using Image Decoder.
 Then you can feed each YUV Image as a Video Input to Media Recorder Engine.

 Go through the Media Recorder Source Code to get more info.









 On Mon, Apr 9, 2012 at 1:22 PM, Arun arun.joshi2...@gmail.com wrote:
  hello all,

  I want to convert a sequence of images in to video file in android.
  and wants to share the file on facebook.  i had done lots of RD and
  uses FFmpeg library for the same, But no success.

  please help me.
  and id anyone have working code please provide me.. i am in deep
  trouble.

  Thanks 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

 --
 Warm Regards,
 Nagaraj

-- 
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


[android-developers] Re: Image loading in Gridview

2012-03-30 Thread EhyehAsherEhyeh
Try AsyncTask? You can have doInBackground downloading the images,
then call publishProgress for each image completed, and have
onProgressUpdate update the gridview. You should have no problem
finding tutorials on how to use AsyncTask with a quick search.

On Mar 29, 11:31 am, Febi.M.Felix Maliakkal febimfe...@gmail.com
wrote:
 I have a gridview and i need images from my website to get loaded on to
 this gridview fastly..there should not be any delay..that means,
 downloading action should be in background while the gridview get
 populated..i have implemented a method..but it takes more time...Only after
 downloading the complete pictures, the gridview gets populated...please
 help..

-- 
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


[android-developers] Re: Image loading in Gridview

2012-03-30 Thread Febi.M.Felix Maliakkal
Thank You...:)

On Friday, March 30, 2012 1:32:24 PM UTC+5:30, EhyehAsherEhyeh wrote:

 Try AsyncTask? You can have doInBackground downloading the images, 
 then call publishProgress for each image completed, and have 
 onProgressUpdate update the gridview. You should have no problem 
 finding tutorials on how to use AsyncTask with a quick search. 

 On Mar 29, 11:31 am, Febi.M.Felix Maliakkal febimfe...@gmail.com 
 wrote: 
  I have a gridview and i need images from my website to get loaded on to 
  this gridview fastly..there should not be any delay..that means, 
  downloading action should be in background while the gridview get 
  populated..i have implemented a method..but it takes more time...Only 
 after 
  downloading the complete pictures, the gridview gets populated...please 
  help..

-- 
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

[android-developers] Re: Image CoverFlow not working fine with Android 4.0

2012-03-30 Thread sblantipodi
Ok I fixed the library, now it works.

On 30 Mar, 16:06, sblantipodi perini.dav...@dpsoftware.org wrote:
 Hi, I'm working with coverflow, the images are displayed and working
 fine in android 2.3.6 and below versions but is not displayenter image
 description hereed properly in android 4.0 and above sub versions.

 No exception is thrown unfortunantly, the image, simply does not
 display correctly on android 4.

-- 
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


[android-developers] Re: Image on external storage

2012-03-07 Thread bt
Nobody can help me?

On Mar 5, 12:39 pm, bt barta...@gmail.com wrote:
 Hi,

 I would like to display an image from external storage which is 72x72
 px.
 My device has high density.
 The image view height and width are wrap_content.

 I got different results if I load the image or use an URL.

 If I use an URL like this then the result will be about 48x48px.

                 imageView.setImageURI(Uri.fromFile(file));

 If I load the bitmap the result is 72x72 px as expected:

                 InputStream is =
 context.getContentResolver().openInputStream(Uri.fromFile(file));
                 Bitmap b = BitmapFactory.decodeStream(is, null, null);
                 is.close();

                 iv2.setImageBitmap(b);

 You can see the results here:

 http://dl.dropbox.com/u/51679071/share/facebook.png

 It would be better if I could use the setImageURI and not to preload
 the image
 and I would like to display the image in appwidgets too.

 Can you tell me what cause the difference and how can I avoid it?

 Thanks,
 Tamas

-- 
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


[android-developers] Re: Image Button Onclik view

2012-02-22 Thread moktarul anam
Hi kholif,

u can use ImageView.setOnclickListener(new setOnclick(){

Onclick(view){
/// user hide/display code here
}

}

Moktarul



On Feb 21, 5:33 pm, kholif adig adig...@gmail.com wrote:
 hi

 I have some problems in image button

 I have some image button that when clicked on the button will display
 the same image.

 the problem is if the image double click the botton on the button will
 display the same image on the first and second positions.

 please give me a solution

 thank you

-- 
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


[android-developers] Re: Image Button Onclik view

2012-02-22 Thread Seshu
Hi kholif,

in xml file for imageview add this one
android:onclick=imageBtnClicked

and in corresponding java file add this method:

public void imageBtnClicked(View v) {
// add your code here
}

On Feb 22, 1:58 pm, moktarul anam mokta...@gmail.com wrote:
 Hi kholif,

 u can use ImageView.setOnclickListener(new setOnclick(){

 Onclick(view){
 /// user hide/display code here

 }
 }

 Moktarul

 On Feb 21, 5:33 pm, kholif adig adig...@gmail.com wrote:







  hi

  I have some problems in image button

  I have some image button that when clicked on the button will display
  the same image.

  the problem is if the image double click the botton on the button will
  display the same image on the first and second positions.

  please give me a solution

  thank you

-- 
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


[android-developers] Re: Image Button Onclik view

2012-02-22 Thread adig
Hi. .

thanks for all the solutions. . :D

On 22 Feb, 16:07, Seshu s.seshu...@gmail.com wrote:
 Hi kholif,

             in xml file for imageview add this one
 android:onclick=imageBtnClicked

 and in corresponding java file add this method:

 public void imageBtnClicked(View v) {
 // add your code here

 }

 On Feb 22, 1:58 pm, moktarul anam mokta...@gmail.com wrote:







  Hi kholif,

  u can use ImageView.setOnclickListener(new setOnclick(){

  Onclick(view){
  /// user hide/display code here

  }
  }

  Moktarul

  On Feb 21, 5:33 pm, kholif adig adig...@gmail.com wrote:

   hi

   I have some problems in image button

   I have some image button that when clicked on the button will display
   the same image.

   the problem is if the image double click the botton on the button will
   display the same image on the first and second positions.

   please give me a solution

   thank you

-- 
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


[android-developers] Re: Image Button Onclik view

2012-02-21 Thread adig
hi




I'll send an email to you and I will include pictures that can explain
the intent of my question. . hopefully help




thank you

On 22 Feb, 06:17, TreKing treking...@gmail.com wrote:
 On Tue, Feb 21, 2012 at 6:33 AM, kholif adig adig...@gmail.com wrote:
  please give me a solution

 Please give a better question. What you posted is very confusing and makes
 little sense (at least to me).

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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


Re: [android-developers] Re: Image Button Onclik view

2012-02-21 Thread TreKing
On Tue, Feb 21, 2012 at 8:00 PM, adig adig...@gmail.com wrote:

 I'll send an email to you


Uh, no. Please reply to this thread and the whole group.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

[android-developers] Re: Image button Issue

2012-02-12 Thread mark2011
Dear fei ji :

Thanks for your kindly response.

I had tried to use dip instead of px, but it doesm't work.

Should I add anything except dip?

BR,
Mark

On Feb 10, 7:31 pm, fei ji ufo22940...@gmail.com wrote:
 Did you use dip when setting height and width of ImageButton?



 On Fri, Feb 10, 2012 at 7:19 PM, mark2011 androidmark2...@gmail.com wrote:
  Dear All :

     I set up the background image, it will automatically adjust to
  match the diffent screens of different devices. But the image set for
  the button is not. Is there any method that I don't need to adjust the
  position of the ImageButton to match the different devices?

  Thanks in advanced.

  BR,
  Mark

  --
  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- Hide quoted text -

 - Show quoted text -

-- 
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


[android-developers] Re: Image comparison problem: getPixel() in android and getRGB() in JDK return different values for the same image

2012-02-05 Thread Ergen
The problem was the JPG format. With PNG it works


On 4 Feb., 01:42, gjs garyjamessi...@gmail.com wrote:
 Hi,

 Also maybe try .png format if possible.

 Regards

 On Feb 4, 8:21 am, Romain Guy romain...@android.com wrote:







  First make sure that both return values in the same format (Android returns
  ARGB not RGBA.) Also, f I remember correctly, Java2D can apply color
  profiles when loading a bitmap.
  On Feb 3, 2012 11:05 AM, Ergen andv...@googlemail.com wrote:

   Hi.  I want to compare two images. One image is on the android client
   and another image is on the server (with Tomcat, JDK).  I need also to
   calculate two histograms - one for each image - and to compare they

   The problem is: getPixel (x, y) (on Android) and getRGB (x, y) (JDK)
   return different rgb color numbers for the point with the same
   coordinates (x, y). The images are here identical (JPG, Size: 3x3).

   Why are the results different?  And what to do? I've been looking for
   the answer everywhere, but...

   ***
   Pseudocode for Androids Activity
   ***
   BitmapFactory.Options opt = new BitmapFactory.Options();
   opt.inPreferredConfig = Bitmap.Config.ARGB_;

   mBitmap = BitmapFactory.decodeFile(imageSource, opt);

   int intColor = 0;
   for (int x = 0; x  mBitmap.getWidth(); x++) {
     for (int y = 0; y  mBitmap.getHeight(); y++) {
          intColor = mBitmap.getPixel(x, y);
          System.out.print( (+ x + ,+ y +) c: + intColor);
     }
   }System.out.println();

   Result for example image 3x3:
   (0,0)c:-7882802   (0,1)c:-9859138   (0,2)c:-6507579
   (1,0)c:-12883825 (1,1)c:-6574388   (1,2)c:-7948604
   (2,0)c:-7489593   (2,1)c:-10579009 (2,2)c:-6573359

   
   Pseudocode for JDK
   
   BufferedImage img = ImageIO.read( file );

   int intColor = 0;
   for ( int x = 0; x  img.getWidth(); x++ )      {
     for ( int y = 0; y  img.getHeight(); y++ ) {
        intColor = img.getRGB( x, y );
        System.out.print( (+ x + ,+ y +) c: + intColor);
     }
   }System.out.println();

   Result for the same image:
    (0,0)c:-7883056    (0,1)c:-9728065   (0,2)c:-6507579
    (1,0)c:-12818030  (1,1)c:-6377523   (1,2)c:-7883323
    (2,0)c:-7424055    (2,1)c:-10513470 (2,2)c:-6573358

   --
   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

-- 
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


[android-developers] Re: Image comparison problem: getPixel() in android and getRGB() in JDK return different values for the same image

2012-02-05 Thread Ergen
The problem was the JPG format.

On 3 Feb., 22:21, Romain Guy romain...@android.com wrote:
 First make sure that both return values in the same format (Android returns
 ARGB not RGBA.) Also, f I remember correctly, Java2D can apply color
 profiles when loading a bitmap.
 On Feb 3, 2012 11:05 AM, Ergen andv...@googlemail.com wrote:







  Hi.  I want to compare two images. One image is on the android client
  and another image is on the server (with Tomcat, JDK).  I need also to
  calculate two histograms - one for each image - and to compare they

  The problem is: getPixel (x, y) (on Android) and getRGB (x, y) (JDK)
  return different rgb color numbers for the point with the same
  coordinates (x, y). The images are here identical (JPG, Size: 3x3).

  Why are the results different?  And what to do? I've been looking for
  the answer everywhere, but...

  ***
  Pseudocode for Androids Activity
  ***
  BitmapFactory.Options opt = new BitmapFactory.Options();
  opt.inPreferredConfig = Bitmap.Config.ARGB_;

  mBitmap = BitmapFactory.decodeFile(imageSource, opt);

  int intColor = 0;
  for (int x = 0; x  mBitmap.getWidth(); x++) {
    for (int y = 0; y  mBitmap.getHeight(); y++) {
         intColor = mBitmap.getPixel(x, y);
         System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for example image 3x3:
  (0,0)c:-7882802   (0,1)c:-9859138   (0,2)c:-6507579
  (1,0)c:-12883825 (1,1)c:-6574388   (1,2)c:-7948604
  (2,0)c:-7489593   (2,1)c:-10579009 (2,2)c:-6573359

  
  Pseudocode for JDK
  
  BufferedImage img = ImageIO.read( file );

  int intColor = 0;
  for ( int x = 0; x  img.getWidth(); x++ )      {
    for ( int y = 0; y  img.getHeight(); y++ ) {
       intColor = img.getRGB( x, y );
       System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for the same image:
   (0,0)c:-7883056    (0,1)c:-9728065   (0,2)c:-6507579
   (1,0)c:-12818030  (1,1)c:-6377523   (1,2)c:-7883323
   (2,0)c:-7424055    (2,1)c:-10513470 (2,2)c:-6573358

  --
  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

-- 
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


[android-developers] Re: Image comparison problem: getPixel() in android and getRGB() in JDK return different values for the same image

2012-02-04 Thread Ergen
Thanks.
I've thought about it. And I tried to change the format _after_
loading the image.
I created a new image IMG2 with new BufferedImage(width, hight,
IMAGE_TYPE) and copied old image (also IMG1)  into the new image
as IMG2.createGraphics().drawRenderedImage(IMG1,null)
Then i've tested all the formats in Java2D  (all constans of
IMAGE_TYPE). All in vain.

 Also, f I remember correctly, Java2D can apply color
 profiles when loading a bitmap.

That would be perfect. But I found no method to make it.
I'll try it again in the evening...

On 3 Feb., 22:21, Romain Guy romain...@android.com wrote:
 First make sure that both return values in the same format (Android returns
 ARGB not RGBA.) Also, f I remember correctly, Java2D can apply color
 profiles when loading a bitmap.
 On Feb 3, 2012 11:05 AM, Ergen andv...@googlemail.com wrote:







  Hi.  I want to compare two images. One image is on the android client
  and another image is on the server (with Tomcat, JDK).  I need also to
  calculate two histograms - one for each image - and to compare they

  The problem is: getPixel (x, y) (on Android) and getRGB (x, y) (JDK)
  return different rgb color numbers for the point with the same
  coordinates (x, y). The images are here identical (JPG, Size: 3x3).

  Why are the results different?  And what to do? I've been looking for
  the answer everywhere, but...

  ***
  Pseudocode for Androids Activity
  ***
  BitmapFactory.Options opt = new BitmapFactory.Options();
  opt.inPreferredConfig = Bitmap.Config.ARGB_;

  mBitmap = BitmapFactory.decodeFile(imageSource, opt);

  int intColor = 0;
  for (int x = 0; x  mBitmap.getWidth(); x++) {
    for (int y = 0; y  mBitmap.getHeight(); y++) {
         intColor = mBitmap.getPixel(x, y);
         System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for example image 3x3:
  (0,0)c:-7882802   (0,1)c:-9859138   (0,2)c:-6507579
  (1,0)c:-12883825 (1,1)c:-6574388   (1,2)c:-7948604
  (2,0)c:-7489593   (2,1)c:-10579009 (2,2)c:-6573359

  
  Pseudocode for JDK
  
  BufferedImage img = ImageIO.read( file );

  int intColor = 0;
  for ( int x = 0; x  img.getWidth(); x++ )      {
    for ( int y = 0; y  img.getHeight(); y++ ) {
       intColor = img.getRGB( x, y );
       System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for the same image:
   (0,0)c:-7883056    (0,1)c:-9728065   (0,2)c:-6507579
   (1,0)c:-12818030  (1,1)c:-6377523   (1,2)c:-7883323
   (2,0)c:-7424055    (2,1)c:-10513470 (2,2)c:-6573358

  --
  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

-- 
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


[android-developers] Re: Image comparison problem: getPixel() in android and getRGB() in JDK return different values for the same image

2012-02-04 Thread Ergen
Thanks.  I tried it once, but that changed nothing.
I'll try it again. I need solve the problem somehow. :)

On 4 Feb., 01:42, gjs garyjamessi...@gmail.com wrote:
 Hi,

 Also maybe try .png format if possible.

 Regards

 On Feb 4, 8:21 am, Romain Guy romain...@android.com wrote:







  First make sure that both return values in the same format (Android returns
  ARGB not RGBA.) Also, f I remember correctly, Java2D can apply color
  profiles when loading a bitmap.
  On Feb 3, 2012 11:05 AM, Ergen andv...@googlemail.com wrote:

   Hi.  I want to compare two images. One image is on the android client
   and another image is on the server (with Tomcat, JDK).  I need also to
   calculate two histograms - one for each image - and to compare they

   The problem is: getPixel (x, y) (on Android) and getRGB (x, y) (JDK)
   return different rgb color numbers for the point with the same
   coordinates (x, y). The images are here identical (JPG, Size: 3x3).

   Why are the results different?  And what to do? I've been looking for
   the answer everywhere, but...

   ***
   Pseudocode for Androids Activity
   ***
   BitmapFactory.Options opt = new BitmapFactory.Options();
   opt.inPreferredConfig = Bitmap.Config.ARGB_;

   mBitmap = BitmapFactory.decodeFile(imageSource, opt);

   int intColor = 0;
   for (int x = 0; x  mBitmap.getWidth(); x++) {
     for (int y = 0; y  mBitmap.getHeight(); y++) {
          intColor = mBitmap.getPixel(x, y);
          System.out.print( (+ x + ,+ y +) c: + intColor);
     }
   }System.out.println();

   Result for example image 3x3:
   (0,0)c:-7882802   (0,1)c:-9859138   (0,2)c:-6507579
   (1,0)c:-12883825 (1,1)c:-6574388   (1,2)c:-7948604
   (2,0)c:-7489593   (2,1)c:-10579009 (2,2)c:-6573359

   
   Pseudocode for JDK
   
   BufferedImage img = ImageIO.read( file );

   int intColor = 0;
   for ( int x = 0; x  img.getWidth(); x++ )      {
     for ( int y = 0; y  img.getHeight(); y++ ) {
        intColor = img.getRGB( x, y );
        System.out.print( (+ x + ,+ y +) c: + intColor);
     }
   }System.out.println();

   Result for the same image:
    (0,0)c:-7883056    (0,1)c:-9728065   (0,2)c:-6507579
    (1,0)c:-12818030  (1,1)c:-6377523   (1,2)c:-7883323
    (2,0)c:-7424055    (2,1)c:-10513470 (2,2)c:-6573358

   --
   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

-- 
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


[android-developers] Re: Image comparison problem: getPixel() in android and getRGB() in JDK return different values for the same image

2012-02-03 Thread gjs
Hi,

Also maybe try .png format if possible.

Regards

On Feb 4, 8:21 am, Romain Guy romain...@android.com wrote:
 First make sure that both return values in the same format (Android returns
 ARGB not RGBA.) Also, f I remember correctly, Java2D can apply color
 profiles when loading a bitmap.
 On Feb 3, 2012 11:05 AM, Ergen andv...@googlemail.com wrote:







  Hi.  I want to compare two images. One image is on the android client
  and another image is on the server (with Tomcat, JDK).  I need also to
  calculate two histograms - one for each image - and to compare they

  The problem is: getPixel (x, y) (on Android) and getRGB (x, y) (JDK)
  return different rgb color numbers for the point with the same
  coordinates (x, y). The images are here identical (JPG, Size: 3x3).

  Why are the results different?  And what to do? I've been looking for
  the answer everywhere, but...

  ***
  Pseudocode for Androids Activity
  ***
  BitmapFactory.Options opt = new BitmapFactory.Options();
  opt.inPreferredConfig = Bitmap.Config.ARGB_;

  mBitmap = BitmapFactory.decodeFile(imageSource, opt);

  int intColor = 0;
  for (int x = 0; x  mBitmap.getWidth(); x++) {
    for (int y = 0; y  mBitmap.getHeight(); y++) {
         intColor = mBitmap.getPixel(x, y);
         System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for example image 3x3:
  (0,0)c:-7882802   (0,1)c:-9859138   (0,2)c:-6507579
  (1,0)c:-12883825 (1,1)c:-6574388   (1,2)c:-7948604
  (2,0)c:-7489593   (2,1)c:-10579009 (2,2)c:-6573359

  
  Pseudocode for JDK
  
  BufferedImage img = ImageIO.read( file );

  int intColor = 0;
  for ( int x = 0; x  img.getWidth(); x++ )      {
    for ( int y = 0; y  img.getHeight(); y++ ) {
       intColor = img.getRGB( x, y );
       System.out.print( (+ x + ,+ y +) c: + intColor);
    }
  }System.out.println();

  Result for the same image:
   (0,0)c:-7883056    (0,1)c:-9728065   (0,2)c:-6507579
   (1,0)c:-12818030  (1,1)c:-6377523   (1,2)c:-7883323
   (2,0)c:-7424055    (2,1)c:-10513470 (2,2)c:-6573358

  --
  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

-- 
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


[android-developers] Re: Image Quality problems using Canvas and canvas.scale(Scale, Scale);

2012-01-25 Thread JamesColeman
Thank you for your reply, I appreciate the input!

Overall I agree with what you are saying about the bleeding
obvious.  However, I down scaled the exact same images on
BlackBerry's and had no problems whatsoever.  In our graphics arts, I
downscale graphics all the time and end up with great looking images.
The problem I am experiencing is something particular to Android
Canvas scale and is similar to the problem in the link I posted.

In intend to have a pinch zoom control the canvas scale so it looks
like I have a challenge ahead of me. One would think if I can pull it
off on a BlackBerry I could do it on an Android somehow.  I hope I am
not stuck with it as you say.

On Jan 22, 1:05 am, Peter Webb r.peter.w...@gmail.com wrote:
 At the risk of stating the bleeding obvious, if you upscale a bitmap
 *anywhere* in your code by a factor which is not an exact integer (1,
 2, 3, etc) then the system will not be able to exactly reproduce the
 original image, and will be interpolating and/or duplicating pixels to
 make it fit. Which gives you a not so great result.

 You have gone to great lengths to avoid scaling when you read it in
 (using Bitmap Factory Options), this is largely a waste of time if you
 scale it for writing using canvas.scale. You will still get scaling
 artefacts on write. You need to suppress scaling for read *and* write.

 The only way that I know of to get pinsharp graphics - with your
 bitmaps appearing exactly how you intended - is to write to a canvas
 which has the same resolution as the actual device (or View). The
 downside of this is that you have to manage all possible screen
 resolutions within your code, as you can no longer use the system to
 map a fixed co-ordinate space in your code to the specs of the actual
 screen. A pretty obvious trade-off between coding simplicity and image
 quality.

 If you are already relying on automatic output scaling for lots of
 other stuff in your code, you are probably stuck with it.

 Peter Webb

 On Jan 22, 2:15 pm, JamesColeman jamescole...@radicalphotography.com
 wrote:







  I am having Image Quality problems using Canvas and
  canvas.scale(Scale, Scale); they look exactly like the following:

 http://stackoverflow.com/questions/2041207/android-quality-of-the-ima...

  I believe I have read all the posts on image quality problems when re-
  sizing bitmaps, but it doesn't seem to help when scaling with a Canvas
  scale(float scale).

  I have tried many different options as suggested by the image quality
  posts.

  BitmapFactory.Options options = new BitmapFactory.Options();
  options.inJustDecodeBounds = false;
  options.inDither = false;
  options.inSampleSize = 1;
  options.inScaled = false;
  options.inPreferredConfig = Bitmap.Config.ARGB_;//I thought this
  would do it
  CurrentPicture = BitmapFactory.decodeFile(path, options);//Also tried
  decodeStream()

  PicturePaint = new Paint();
  //PicturePaint = new Paint(Paint.FILTER_BITMAP_FLAG); //I also tried
  this
  //PicturePaint = new Paint(Paint.ANTI_ALIAS_FLAG);  //I also tried
  this
  canvas.scale(Scale, Scale);
  canvas.drawBitmap(CurrentPicture, 0, 0, PicturePaint);

  I am quite concerned as I am in serious trouble if I can't get the
  image quality problem solved. Any help is appreciated.

  Thanks!

-- 
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


[android-developers] Re: Image Quality problems using Canvas and canvas.scale(Scale, Scale);

2012-01-22 Thread Peter Webb
At the risk of stating the bleeding obvious, if you upscale a bitmap
*anywhere* in your code by a factor which is not an exact integer (1,
2, 3, etc) then the system will not be able to exactly reproduce the
original image, and will be interpolating and/or duplicating pixels to
make it fit. Which gives you a not so great result.

You have gone to great lengths to avoid scaling when you read it in
(using Bitmap Factory Options), this is largely a waste of time if you
scale it for writing using canvas.scale. You will still get scaling
artefacts on write. You need to suppress scaling for read *and* write.

The only way that I know of to get pinsharp graphics - with your
bitmaps appearing exactly how you intended - is to write to a canvas
which has the same resolution as the actual device (or View). The
downside of this is that you have to manage all possible screen
resolutions within your code, as you can no longer use the system to
map a fixed co-ordinate space in your code to the specs of the actual
screen. A pretty obvious trade-off between coding simplicity and image
quality.

If you are already relying on automatic output scaling for lots of
other stuff in your code, you are probably stuck with it.


Peter Webb

On Jan 22, 2:15 pm, JamesColeman jamescole...@radicalphotography.com
wrote:
 I am having Image Quality problems using Canvas and
 canvas.scale(Scale, Scale); they look exactly like the following:

 http://stackoverflow.com/questions/2041207/android-quality-of-the-ima...

 I believe I have read all the posts on image quality problems when re-
 sizing bitmaps, but it doesn't seem to help when scaling with a Canvas
 scale(float scale).

 I have tried many different options as suggested by the image quality
 posts.

 BitmapFactory.Options options = new BitmapFactory.Options();
 options.inJustDecodeBounds = false;
 options.inDither = false;
 options.inSampleSize = 1;
 options.inScaled = false;
 options.inPreferredConfig = Bitmap.Config.ARGB_;//I thought this
 would do it
 CurrentPicture = BitmapFactory.decodeFile(path, options);//Also tried
 decodeStream()

 PicturePaint = new Paint();
 //PicturePaint = new Paint(Paint.FILTER_BITMAP_FLAG); //I also tried
 this
 //PicturePaint = new Paint(Paint.ANTI_ALIAS_FLAG);  //I also tried
 this
 canvas.scale(Scale, Scale);
 canvas.drawBitmap(CurrentPicture, 0, 0, PicturePaint);

 I am quite concerned as I am in serious trouble if I can't get the
 image quality problem solved. Any help is appreciated.

 Thanks!

-- 
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


[android-developers] Re: image to text android OCR help?

2011-12-15 Thread Nikolay
There are Java APIs which wrap calls for native interfaces, for
example, for one of the most popular opensource OCR engines -
Tesseract (http://groups.google.com/group/tesseract-ocr/) - there are
some Java wrappers like tesjeract (http://code.google.com/p/
tesjeract/) or Tess4J (http://tess4j.sf.net/).

One more solution could be a cloud service. It requires end-user
application to have the internet connection, but it's independent from
your programming language choice and resources limitations. Have a
look at ABBYY Cloud OCR SDK (http://www.ocrsdk.com/), it's a cloud-
based OCR SDK recently launched by ABBYY. It's in beta, so for now
it's totally free to use and it has a ready-to-go Android code
samples: https://github.com/abbyysdk/ocrsdk.com/tree/master/Android

On Dec 12, 11:35 am, tahir ashraf tahir90.webmas...@gmail.com wrote:
 Hi to All,

 Iam new to android development and Iam trying to make an OCR paractice
 app which should recognize text from image and then show it in
 textarea.Please guide me in the right direction what should I do?

-- 
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


[android-developers] Re: Image dpi, does Android care about it?

2011-10-06 Thread Studio LFP
Check out this documentation:

http://developer.android.com/guide/practices/screens_support.html#qualifiers

Different image densities can be stored in different folders so Android can 
pick the best one suited for the device. Android also scales images when 
loaded unless they are stored in the drawable-nodpi folder when used in XML.

You can control the scaling of images if you use the BitmapFactory by using 
BitmapFactory.Options and set isScaled to false.

http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inScaled

Steven
Studio LFP
http://www.studio-lfp.com


On Thursday, October 6, 2011 10:52:26 AM UTC-5, dara kok wrote:

 It's said that dpi is only relevant when printing a document, not when 
 viewing the image on screen.

 in my case, i have an image created with regular resolution, 70 dpi. when i 
 put and display it on a phone with size set to wrap content. it shows a bit 
 stretched out and the edge is blurry.

 but when i increase resolution of the same image, say 300 dpi, and display 
 it in my app again, it shows  a smaller image with crisp edge.

 so it seems image resolution has an effect here. but i just can't 
 understand how Android interpret the change in resolution.

 Can anyone here help me understand this?


 Thanks,
 dara kok 


-- 
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

[android-developers] Re: Image processing

2011-09-27 Thread ko5tik


On 24 Sep., 12:26, Venki itzmesri...@gmail.com wrote:
        I know Image Processing. I don't know anything about android
 though. I know Java, J2EE so I think I know some basics.I have planned
 to do some android apps using image processing. Where should I start?
 Give me some tutorial related to image processing using android. If
 you have created any apps using image processing in android please
 tell me about it.

Zou are welcome to your JavaOCR project:

http://sourceforge.net/projects/javaocr

We are focusing primarily on OCR , but OCR also involves some image
processing - and we could use help
on this.   There are android demos (not yet complete,  but sampling
and teaching recognisers work,  corresponding recogniser is not yet
ready)

An I already  published applications using this library:
http://www.pribluda.de/android/charger/
http://www.pribluda.de/android/ocrcall/

-- 
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


[android-developers] Re: Image processing

2011-09-27 Thread ko5tik
...  damn german keyboard

On 27 Sep., 08:34, ko5tik kpriblo...@yahoo.com wrote:
 On 24 Sep., 12:26, Venki itzmesri...@gmail.com wrote:

         I know Image Processing. I don't know anything about android
  though. I know Java, J2EE so I think I know some basics.I have planned
  to do some android apps using image processing. Where should I start?
  Give me some tutorial related to image processing using android. If
  you have created any apps using image processing in android please
  tell me about it.

 Zou are welcome to your JavaOCR project:

 http://sourceforge.net/projects/javaocr

 We are focusing primarily on OCR , but OCR also involves some image
 processing - and we could use help
 on this.   There are android demos (not yet complete,  but sampling
 and teaching recognisers work,  corresponding recogniser is not yet
 ready)

 An I already  published applications using this 
 library:http://www.pribluda.de/android/charger/http://www.pribluda.de/android/ocrcall/

-- 
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


[android-developers] Re: Image processing

2011-09-27 Thread Yan
FYI: There's an awesome app in the Android Market called Paper Camera
that's doing some kind of image processing. You should look into how
they implemented it. Check out their YouTube demo at:

https://market.android.com/details?id=com.dama.papercamera


On Sep 26, 11:54 pm, ko5tik kpriblo...@yahoo.com wrote:
 ...  damn german keyboard

 On 27 Sep., 08:34, ko5tik kpriblo...@yahoo.com wrote:



  On 24 Sep., 12:26, Venki itzmesri...@gmail.com wrote:

          I know Image Processing. I don't know anything about android
   though. I know Java, J2EE so I think I know some basics.I have planned
   to do some android apps using image processing. Where should I start?
   Give me some tutorial related to image processing using android. If
   you have created any apps using image processing in android please
   tell me about it.

  Zou are welcome to your JavaOCR project:

 http://sourceforge.net/projects/javaocr

  We are focusing primarily on OCR , but OCR also involves some image
  processing - and we could use help
  on this.   There are android demos (not yet complete,  but sampling
  and teaching recognisers work,  corresponding recogniser is not yet
  ready)

  An I already  published applications using this 
  library:http://www.pribluda.de/android/charger/http://www.pribluda.de/android...

-- 
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


[android-developers] Re: Image processing

2011-09-26 Thread Indicator Veritatis
You should start with the chapter on running Sobel Edge Detection on
Android using the NDK in Android in Action, 2nd or 3rd edition.

The 3rd edition is really written for Honeycomb, so you might want to
go ahead and buy the 2nd which is already available. Or go to the
website for the book and download the code, though it will be hard to
pick up much from it without the accompanying text.

For heavy duty image processing you are likely to want to use the NDK
rather than the SDK. Yet 'zxing' does surprisingly well without using
the NDK. That too is a good project for you to look at, since it uses
image processing for barcode decoding. The Java code is better
documented than many other open source projects.

On Sep 24, 9:26 am, Venki itzmesri...@gmail.com wrote:
        I know Image Processing. I don't know anything about android
 though. I know Java, J2EE so I think I know some basics.I have planned
Y to do some android apps using image processing. Where should I start?
 Give me some tutorial related to image processing using android. If
 you have created any apps using image processing in android please
 tell me about it.

 Thanks 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


[android-developers] Re: image btton problem

2011-08-27 Thread Amit

Use png with transparency. I use gimp for this.

Thanks,
A

On Aug 26, 1:54 pm, Ratheesh Valamchuzhy android...@gmail.com wrote:
 The image is a png image...

-- 
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


[android-developers] Re: image won't show

2011-08-24 Thread Jeremy Dagorn
Hi,

Why you don't do something like that :

String imageUrl = file:///android_asset/smiley.png;
WebView wv = new WebView(this); // or findViewById in your case
wv.loadUrl(imageUrl);



On Aug 23, 9:49 pm, bob b...@coolgroups.com wrote:
                 Anyone know why this image won't show?

 WebView wv = (WebView) findViewById(R.id.widget30);
 String html = htmlbodyimg src=\file:///android_asset/smiley.png
 \/body/html;
 wv.loadData(html, text/html, utf-8);

-- 
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


[android-developers] Re: Image Map Type style Overlay in MapView

2011-08-24 Thread EVK
Scott. Thanks for sharing this.

I got ImageMapType working on Javascript using getTileUrl method of the 
Google Maps API V3. 
But I am not sure how to do this on Android's native MapView object. I am 
sifting the WWW for a relevant
tutorial which can help me do this, luckily I found your post.

Could you please share some pointers on how to get started on this? How do I 
use overlays on MapView to
achieve ImageMapType kind of functionality? If possible could you share your 
code? or point me to some references 
that you may have used?

Thanks a bunch

-EVK

-- 
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

[android-developers] Re: image won't show

2011-08-24 Thread bob
Hmm... That worked, but I need HTML mixed with the image.  Do you know
how to do that?



On Aug 24, 1:49 am, Jeremy Dagorn jeremy.dag...@gmail.com wrote:
 Hi,

 Why you don't do something like that :

 String imageUrl = file:///android_asset/smiley.png;
 WebView wv = new WebView(this); // or findViewById in your case
 wv.loadUrl(imageUrl);

 On Aug 23, 9:49 pm, bob b...@coolgroups.com wrote:







                  Anyone know why this image won't show?

  WebView wv = (WebView) findViewById(R.id.widget30);
  String html = htmlbodyimg src=\file:///android_asset/smiley.png
  \/body/html;
  wv.loadData(html, text/html, utf-8);

-- 
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


[android-developers] Re: image won't show

2011-08-24 Thread skink


On Aug 24, 10:40 pm, bob b...@coolgroups.com wrote:
 Hmm... That worked, but I need HTML mixed with the image.  Do you know
 how to do that?

 On Aug 24, 1:49 am, Jeremy Dagorn jeremy.dag...@gmail.com wrote:



  Hi,

  Why you don't do something like that :

  String imageUrl = file:///android_asset/smiley.png;
  WebView wv = new WebView(this); // or findViewById in your case
  wv.loadUrl(imageUrl);

  On Aug 23, 9:49 pm, bob b...@coolgroups.com wrote:

                   Anyone know why this image won't show?

   WebView wv = (WebView) findViewById(R.id.widget30);
   String html = htmlbodyimg src=\file:///android_asset/smiley.png
   \/body/html;
   wv.loadData(html, text/html, utf-8);

If you need just a simple image and some text around you can use
TextView and its setSpan method

pskink

-- 
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


[android-developers] Re: Image Gallery

2011-08-02 Thread zahiritpro
@TreKing:Can i get the source code of any good gallery application so
that i can add few features and submit as a mini project...

On Jul 30, 1:45 am, TreKing treking...@gmail.com wrote:
 On Wed, Jul 27, 2011 at 2:29 PM, zahiritpro zahirit...@gmail.com wrote:
  How to develop an application that would modify the existing gallery of the
  installed device by adding some additional toolsPlease let me know as
  soon as possible.

 What kind of answer are you expecting?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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


Re: [android-developers] Re: Image Gallery

2011-08-02 Thread TreKing
On Mon, Aug 1, 2011 at 8:53 AM, zahiritpro zahirit...@gmail.com wrote:

 @TreKing:Can i get the source code of any good gallery application so that
 i can add few features and submit as a mini project...


IDK - look at the Android source, assuming the default image viewer app is
in there, or Google around for open source Android gallery or something.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

[android-developers] Re: Image buttons selector XML - how to align with phone's original theme?

2011-08-02 Thread Eric
Any idea?

Is it possible to simulate a button click and the app captures the
color of the pressed button?

Thanks!

-- 
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


[android-developers] Re: Image Issue Please help me

2011-07-16 Thread Ankit Kasliwal
is there is no one which help me in camera issue.

On Fri, Jul 15, 2011 at 4:40 PM, Ankit Kasliwal kasliwalankit2...@gmail.com
 wrote:

 Hello Everyone,

 Is there anyway to reduce the resolution of picture taken using
 camera? It takes long time to upload the image to server Coz i m converting
 the image in bytes and
 send to server and may be the size of image may be 3 MB.
 Here is my code which i use.


 SurfaceHolder.Callback surfaceCallback=new SurfaceHolder.Callback() {


 public void surfaceCreated(SurfaceHolder holder)
 {
 mCamera=Camera.open();
 try
 {
 mCamera.setPreviewDisplay(previewHolder);
 mCamera.setOneShotPreviewCallback(null);
 ColorMatrix cm = new ColorMatrix();
 cm.setSaturation(.5f);


 //paint.setColorFilter(new ColorMatrixColorFilter(cm));

 }
 catch (Throwable t)
 {
 Log.e(PictureDemo-surfaceCallback,Exception
 insetPreviewDisplay(), t);
 Toast.makeText(TakePic.this,t.getMessage(),
 Toast.LENGTH_LONG).show();
 }
 }

 public void surfaceChanged(SurfaceHolder holder,int format, int
 width, int height) {
 Camera.Parameters parameters=mCamera.getParameters();

 /*int bestWidth = 0;
   int bestHeight = 0;

 //Customise width/height here - otherwise defaults to screen
 width/height
 ListCamera.Size previewSizes =
 parameters.getSupportedPreviewSizes();
 if (previewSizes.size()  1)
 {
 IteratorCamera.Size cei = previewSizes.iterator();
 while (cei.hasNext())
 {
 Camera.Size aSize = cei.next();
 Log.v(SNAPSHOT,Checking  + aSize.width +  x  +
 aSize.height);
 if (aSize.width  bestWidth  aSize.width =
 LARGEST_WIDTH
  aSize.height  bestHeight  aSize.height =
 LARGEST_HEIGHT)
 {
 // So far it is the biggest without going over the
 screen dimensions
 bestWidth = aSize.width;
 bestHeight = aSize.height;
 }
 }
 }
 if (bestHeight != 0  bestWidth != 0)
 {
 Log.v(SNAPSHOT, Using  + bestWidth +  x  +
 bestHeight);
 parameters.setPreviewSize(bestWidth, bestHeight);
 View cameView = null;
 //cameraView.setLayoutParams(new LinearLayout.LayoutParams(
 bestWidth,bestHeight));
 }*/  /*Not in 1.6*/

  /*Not in 1.6*/
 try
 {
 parameters.setPreviewSize(100, 100);
 parameters.setPictureFormat(PixelFormat.JPEG);
 parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);
 parameters.setJpegQuality(75);
 mCamera.setParameters(parameters);
 mCamera.startPreview();
 }
 catch (Exception e) {
 parameters.setPreviewSize(100, 100);
 parameters.setPictureSize(20, 20);//parameters.setZoom(1);
 /*Not in 1.6*/
 //parameters.setZoom(0); /*Not in 1.6*/
 parameters.setPictureFormat(PixelFormat.JPEG);

 //parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); /*Not in 1.6*/
 //parameters.setJpegQuality(100); /*Not in 1.6*/
 mCamera.setParameters(parameters);
 mCamera.startPreview();
 }


 //-- Must add the following callback to allow the camera
 toautofocus.
 mCamera.autoFocus(new Camera.AutoFocusCallback(){
 public void onAutoFocus(boolean success, Camera camera)
 {
 }

 } );
 }

 public void surfaceDestroyed(SurfaceHolder holder) {
 if(mCamera != null){
 mCamera.stopPreview();
 mCamera.release();
 mCamera=null;
 }
 }
 };

 Camera.PictureCallback photoCallback=new Camera.PictureCallback() {
 public void onPictureTaken(byte[] data, Camera camera) {


 ImgName = String.format(%d.jpg, System.currentTimeMillis());
 //FileOutputStream outStream = null;
 try {


 byte[] imgBtye = data;

 ColorMatrix cm = new ColorMatrix();
 float contrast = 2;
 float brightness = -25;
 cm.set(new float[] { contrast, 0, 0, 0, brightness,0,
 contrast, 0, 0, brightness,0, 0, contrast, 0, brightness,0, 0, 0,
 contrast, 0 });
 Paint paint = new Paint();
 cm.setSaturation(2f);
 paint.setColorFilter(new ColorMatrixColorFilter(cm));

 

[android-developers] Re: Image scaling on Sony Ericsson Xperia phone

2011-07-07 Thread Johan Abramsson
Hi,
I am glad you liked the article, Andreas has done a really great job.

I will forward your thoughts into the customer service organisation.
Thanks for letting us know.
Kind regards
  /Johan

On Jul 6, 8:37 pm, Martin Sall maris.seiman...@gmail.com wrote:
 Really nice article. It is great to see development related tutorials
 fromSonyEricssonlately.

 But I would like to ask about font scaling. I myself am visually
 impaired since birth (but still a software developer) and I know many
 people who wish to use Android devices but cannot do that comfortably
 because there is no font scaling built into the core of Android. This
 is also bad for people over 50 who do not have a perfect vision
 anymore.

 There is a 2 years old feature request on Android issue tracker, but
 it seems abandoned by 
 developers:http://code.google.com/p/android/issues/detail?id=4547

 Of course, each developer can make the fonts scalable, but they do so
 not often. The worst is that the basic phone functions (menu,
 contacts, SMS, mail) have too tiny texts.
 I myself am looking forward to buy SonyEricsson Neo, but I am afraid I
 won't be able to use it comfortably, I need a little bit bigger fonts
 everywhere and I would like avoid rooting the device just to do some
 hacky font replacement which would look ugly anyway.

 So if someone could bringSonyEricsson'sattention and ask them to
 develop more accessible software (just a basic home screen, contacts,
 SMS, menus), I guess,SonyEricssonwould get buyers from all the 50
 old people range + some bunch of people with impaired vision.

 I promise you,SonyEricsson: on the day you develop and release some
 software update which allows to scale fonts bigger on aSonyEricsson
 Neo phone, I'll buy it. For now I'll just read articles about Android
 development and use SDK/VirtualBox Android emulators.

 Please,SonyEricsson(and other developers, too), give a helping hand
 to visually impaired and not-so-young people.

 Good luck to all developers,
 Martin
 and some other visually impaired people.

 On 27 Jūn., 12:13, Johan Abramsson johan.abrams...@sonyericsson.com
 wrote:







  Hi,
  This article does, of course, apply to any android phone.
  Since we updated the blog post with a link to tis article the link to
  the blog post has changed. The new link is here,

 http://blogs.sonyericsson.com/wp/2011/06/27/how-to-scale-images-for-y...

  We apologize for any inconviniance.
  Kind regards
    /Johan

  On Jun 22, 10:07 am, Johan Abramsson

  johan.abrams...@sonyericsson.com wrote:
   Hi,

   Hard to get images scaled correctly for your application? Are your
   images too large and causing memory problems? Or are they scaled
   incorrectly with a poor user experience as a result?
   To find a good solution for this, we asked Andreas Agvard from the
  SonyEricssonsoftware department to help shed some light on this
   topic.

   More data and a good sample project are found 
   here:http://blogs.sonyericsson.com/wp/2011/06/13/how-to-scale-images-for-y...

   Comments and question ? Please direct them to this news thread.
   Kind regards
     /Johan

-- 
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


[android-developers] Re: Image scaling on Sony Ericsson Xperia phone

2011-07-06 Thread Martin Sall
Really nice article. It is great to see development related tutorials
from Sony Ericsson lately.

But I would like to ask about font scaling. I myself am visually
impaired since birth (but still a software developer) and I know many
people who wish to use Android devices but cannot do that comfortably
because there is no font scaling built into the core of Android. This
is also bad for people over 50 who do not have a perfect vision
anymore.

There is a 2 years old feature request on Android issue tracker, but
it seems abandoned by developers:
http://code.google.com/p/android/issues/detail?id=4547

Of course, each developer can make the fonts scalable, but they do so
not often. The worst is that the basic phone functions (menu,
contacts, SMS, mail) have too tiny texts.
I myself am looking forward to buy SonyEricsson Neo, but I am afraid I
won't be able to use it comfortably, I need a little bit bigger fonts
everywhere and I would like avoid rooting the device just to do some
hacky font replacement which would look ugly anyway.

So if someone could bring Sony Ericsson's attention and ask them to
develop more accessible software (just a basic home screen, contacts,
SMS, menus), I guess, Sony Ericsson would get buyers from all the 50
old people range + some bunch of people with impaired vision.

I promise you, Sony Ericsson: on the day you develop and release some
software update which allows to scale fonts bigger on a Sony Ericsson
Neo phone, I'll buy it. For now I'll just read articles about Android
development and use SDK/VirtualBox Android emulators.

Please, Sony Ericsson (and other developers, too), give a helping hand
to visually impaired and not-so-young people.

Good luck to all developers,
Martin
and some other visually impaired people.

On 27 Jūn., 12:13, Johan Abramsson johan.abrams...@sonyericsson.com
wrote:
 Hi,
 This article does, of course, apply to any android phone.
 Since we updated the blog post with a link to tis article the link to
 the blog post has changed. The new link is here,

 http://blogs.sonyericsson.com/wp/2011/06/27/how-to-scale-images-for-y...

 We apologize for any inconviniance.
 Kind regards
   /Johan

 On Jun 22, 10:07 am, Johan Abramsson



 johan.abrams...@sonyericsson.com wrote:
  Hi,

  Hard to get images scaled correctly for your application? Are your
  images too large and causing memory problems? Or are they scaled
  incorrectly with a poor user experience as a result?
  To find a good solution for this, we asked Andreas Agvard from the
 SonyEricssonsoftware department to help shed some light on this
  topic.

  More data and a good sample project are found 
  here:http://blogs.sonyericsson.com/wp/2011/06/13/how-to-scale-images-for-y...

  Comments and question ? Please direct them to this news thread.
  Kind regards
    /Johan

-- 
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


[android-developers] Re: Image Map Type style Overlay in MapView

2011-07-01 Thread Scott Kennedy
I figured it out.  For anyone else who might be interested, the map
tiles on Android's MapView seem to be twice as dense as the JS API's.
So if you have an existing tileset, just read them in with an
inSampleSize of 2, and adjust the positioning accordingly.

On Jul 1, 1:20 pm, Scott Kennedy skenned...@gmail.com wrote:
 I have a website where I use the Javascript Maps API, and I use an
 Image Map (http://code.google.com/apis/maps/documentation/javascript/
 maptypes.html#ImageMapTypes) to display my custom tiles on top of a
 map.  These tiles use the tile/pixel coordinates as defined by Google
 in that document.  This works fine for the Javascript API.

 To give a better in-app experience, I'd like to use a MapView, rather
 than a WebView (or opening the browser) with the JS API.  However, I'm
 having a hard time getting the tiles to display properly in the
 MapView.  It doesn't seem to behave the same way as the JS API.  I'm
 not sure whether that's due to tile size, the projection used, or
 something else, but I was wondering if anyone had done something
 similar and could share some ideas or code on how to do this.

 Thanks

-- 
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


[android-developers] Re: Image scaling on Sony Ericsson Xperia phone

2011-06-27 Thread Johan Abramsson
Hi,
This article does, of course, apply to any android phone.
Since we updated the blog post with a link to tis article the link to
the blog post has changed. The new link is here,

http://blogs.sonyericsson.com/wp/2011/06/27/how-to-scale-images-for-your-android%E2%84%A2-application/

We apologize for any inconviniance.
Kind regards
  /Johan


On Jun 22, 10:07 am, Johan Abramsson
johan.abrams...@sonyericsson.com wrote:
 Hi,

 Hard to get images scaled correctly for your application? Are your
 images too large and causing memory problems? Or are they scaled
 incorrectly with a poor user experience as a result?
 To find a good solution for this, we asked Andreas Agvard from the
 Sony Ericsson software department to help shed some light on this
 topic.

 More data and a good sample project are found 
 here:http://blogs.sonyericsson.com/wp/2011/06/13/how-to-scale-images-for-y...

 Comments and question ? Please direct them to this news thread.
 Kind regards
   /Johan

-- 
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


[android-developers] Re: Image Instance on Android

2011-06-20 Thread gaara
ok could i say i wanna to extract the Byte[] which contains the
image's informations
Peace,
Gaara

On Jun 20, 5:17 pm, TreKing treking...@gmail.com wrote:
 On Mon, Jun 20, 2011 at 6:25 AM, gaara amellal.kamili...@gmail.com wrote:
  I wanna know what's the result or the structure of the preview on Android.

 http://www.catb.org/~esr/faqs/smart-questions.html

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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


[android-developers] Re: Image Picker and Cropper

2011-05-21 Thread neuromit
yes it is. I guess I should have specified that.   From my app I'd
like to let the user pick an image and then crop it but I want to
enforce a specific Width x Height ratio and I was wondering if there
was something in the SDK to do this.

On May 15, 9:24 pm, Nicholas Johnson metthejohn...@gmail.com wrote:
 is this a programming question?

-- 
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


Re: [android-developers] Re: Image Picker and Cropper

2011-05-21 Thread Mark Murphy
Picking an image, yes. Cropping an image, no.

There is some undocumented cropping activity somewhere (Gallery app?),
but it does not work on all devices and, as noted, is not documented.
And even that probably will not let you enforce a specific Width x
Height ratio. Anything that specific would need to be implemented by
you.

On Sat, May 21, 2011 at 6:12 PM, neuromit stuart.lay...@gmail.com wrote:
 yes it is. I guess I should have specified that.   From my app I'd
 like to let the user pick an image and then crop it but I want to
 enforce a specific Width x Height ratio and I was wondering if there
 was something in the SDK to do this.

 On May 15, 9:24 pm, Nicholas Johnson metthejohn...@gmail.com wrote:
 is this a programming question?

 --
 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
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


[android-developers] Re: Image Picker and Cropper

2011-05-15 Thread neuromit
bump...

On May 14, 10:17 am, neuromit stuart.lay...@gmail.com wrote:
 Is there a way to pick an image from the gallery while also specifying
 that it should be cropped or resized to certain dimensions?

-- 
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


[android-developers] Re: Image Picker and Cropper

2011-05-15 Thread Nicholas Johnson
is this a programming question?

-- 
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

[android-developers] Re: image processing in android

2011-04-24 Thread Streets Of Boston
The classes Bitmap and BitmapFactory.

-- 
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

[android-developers] Re: Image processing in Android

2011-04-11 Thread Tancho
Yep, checked the whole memory table ..
everything seems clear, however I always get a Bitmap exceeds VM
Budget and the Bitmap is 64x64

On Apr 11, 1:33 am, lbendlin l...@bendlin.us wrote:
 http://www.eclipse.org/mat/

-- 
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


[android-developers] Re: Image processing in Android

2011-04-11 Thread Yahel
Bitmap memory management is buggy and completely unintuitive. It does
not show in MAT as it is allocated in another place and not counted in
the heap. Well it is counted but not easily released or something.

My app is all about images(a world of faces), and here is how I get it
to work most of the time :

//decodes image and scales it to reduce memory consumption
private Bitmap decodeFile(File f){
try {

//decode image size
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
BitmapFactory.decodeStream(new FileInputStream(f),null,o);

//Find the correct scale value. It should be the power of
2.
final int REQUIRED_SIZE=480;
int width_tmp=o.outWidth, height_tmp=o.outHeight;
int sampleSize=1;
while(true){
if(width_tmp/2REQUIRED_SIZE || height_tmp/
2REQUIRED_SIZE)
break;
width_tmp/=2;
height_tmp/=2;
sampleSize*=2;
}


//decode with inSampleSize
Bitmap bitmap = null;
boolean cacheHasBeenCleared = false;

BitmapFactory.Options options = new
BitmapFactory.Options();
options.inSampleSize=sampleSize;
byte[] tempBuffer=new byte[8000];
options.inTempStorage = tempBuffer;

while ( (bitmap == null)  (sampleSize  64) ) {
try {
bitmap = BitmapFactory.decodeStream(new 
FileInputStream(f),
null, options);
} catch (OutOfMemoryError e) {

if (!cacheHasBeenCleared) {
this.clearMemoryCache();

//Try to free up some memory
System.gc();
System.runFinalization();
System.gc();

cacheHasBeenCleared = true;
}

sampleSize *=2;
}
}

return bitmap;

} catch (FileNotFoundException e) {}
return null;
}

The idea is to try to decode the file at top quality. If that throws
out of memory error, it tries to free memory and reopen the file but
with a smaller scale. Rinse and repeat.

Oh and don't think the second system.gc() can be removed that would be
so naïve of you :D That's Android framework we're talking about :D

Good luck with your app.

Yahel

-- 
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


[android-developers] Re: Image processing in Android

2011-04-10 Thread lbendlin
And you already have exhausted all the MAT features?

-- 
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

[android-developers] Re: Image processing in Android

2011-04-10 Thread lbendlin
http://www.eclipse.org/mat/

-- 
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

[android-developers] Re: image upload

2011-01-24 Thread Kumar Bibek
Well, it's a little different, but it also depends on how the server
is configured to extract and recreate your data. HttpClient is
sufficient for simple file uploads, but getting a multi-part data to
work with your server might be a bit tricky.

On Jan 20, 10:33 pm, cyberkiwi ldryn...@gmail.com wrote:
 how it is possible to upload image from android handset to the server?
 Is the image serialized, send as bytestream and deserialized on the
 server? how it is different from javame version of uploading images to
 the web service?

-- 
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


Re: [android-developers] Re: image background - how to repeat an image rather than strech it

2011-01-14 Thread Richard Leggett
An easy way of making a bitmap repeat is to create an XML file in the drawable 
folder which looks something like this:

?xml version=1.0 encoding=utf-8?
bitmap xmlns:android=http://schemas.android.com/apk/res/android;
android:src=@drawable/background 
android:tileMode=repeat /

background is a PNG in the same folder, it doesn't sound like you need a 9 
patch in this case. Simply assign @drawable/repeatingbackground or whatever you 
called the file, in place of the original bitmap. 

As for rounding corners, you can subclass the view you are rendering (let's say 
an ImageView) and use clipping to mask the corners, there are a few examples 
here:

http://stackoverflow.com/questions/2459916/how-to-make-an-imageview-to-have-rounded-corners

I'm presenting techniques here that are more generalised and re-useable and not 
a specific one-off which could be better performance-wise (so if you are making 
a component that's like a progress bar, you'd do this clipping and 
repeat-bitmap drawing in the onDraw() rather than increasing rendertime by 
compositing a separate RoundedImageView and a repeatable BitmapDrawable 
described above).

Rich


On 13 Jan 2011, at 08:07, Muhammad Ali wrote:

 You can create a bitmap in memory, using your own file and draw it in
 background. It will help you like the repeat image.
 
 
 
 On Jan 12, 1:57 pm, liordav lior...@gmail.com wrote:
 Hi,
 I have an image I want to use as a background to some layout.
 the problem is the image contains a texture of slant lines, so if i
 use a 1 pixel width image or a 9 patch the image is stretched and the
 texture is Twitching, so i can see the slant lines as latitude lines.
 I saw that he android emulator uses a similar texture in the progress
 bar indeterminate animation, is there a special/simple definition to
 order the background image to repeat itself rather than stretch? is
 there a way to do it with 9 patch, cause eventualy i also need the
 corners to be round.
 thanks for the help.
 
 -- 
 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

-- 
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

[android-developers] Re: image background - how to repeat an image rather than strech it

2011-01-13 Thread Muhammad Ali
You can create a bitmap in memory, using your own file and draw it in
background. It will help you like the repeat image.



On Jan 12, 1:57 pm, liordav lior...@gmail.com wrote:
 Hi,
 I have an image I want to use as a background to some layout.
 the problem is the image contains a texture of slant lines, so if i
 use a 1 pixel width image or a 9 patch the image is stretched and the
 texture is Twitching, so i can see the slant lines as latitude lines.
 I saw that he android emulator uses a similar texture in the progress
 bar indeterminate animation, is there a special/simple definition to
 order the background image to repeat itself rather than stretch? is
 there a way to do it with 9 patch, cause eventualy i also need the
 corners to be round.
 thanks for the help.

-- 
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


[android-developers] Re: image background - how to repeat an image rather than strech it

2011-01-12 Thread Doug
See BitmapDrawable and its related xml configuration documentation if
you want to tile an image for the background of a View.

On Jan 12, 12:57 am, liordav lior...@gmail.com wrote:
 Hi,
 I have an image I want to use as a background to some layout.
 the problem is the image contains a texture of slant lines, so if i
 use a 1 pixel width image or a 9 patch the image is stretched and the
 texture is Twitching, so i can see the slant lines as latitude lines.
 I saw that he android emulator uses a similar texture in the progress
 bar indeterminate animation, is there a special/simple definition to
 order the background image to repeat itself rather than stretch? is
 there a way to do it with 9 patch, cause eventualy i also need the
 corners to be round.
 thanks for the help.

-- 
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


[android-developers] Re: Image show problem

2010-12-30 Thread Indicator Veritatis
Well, in a certain important sense, yes, 2.0 is 'obsolete'. But I am
afraid people will read this out of context, so I have to object here:
any Android developer should still keep 2.0 in mind as a probable
target for his applications, even if never the primary target
platform.

That is, most of us should develop using the latest Android 2.3 SDK,
but continue to develop applications that will run well on 2.0, 2.1
and 2.2 devices. Unless you need new bug fixes or new APIs available
only in a later SDK, I would even say it should run on 1.6 devices.

The application I am developing is an example of this: I am using the
2.3 SDK, but the customer will run on a 2.2 phone. So I test on a 2.2
phone. But since the application requires a recent Bluetooth API, I
cannot run it on a 1.6 phone, so there is no point in testing it
there; except to make sure that it doesn't crash (we have done this
test).

I have a give-away app, SylloGizmo, that I originally developed for
Android 1.5. Now since it is hard to even find a 1.5 phone in the wild
anymore, there is not much point in continuing to test it on 1.5. So
whenever I touch the code, I test it on 1.6 and up instead.
This turned out to be valuable, since I found a layout bug that only
appears in 2.1 with a certain choice of screen width and lcd density
(I forget the magic combo now).

It is getting hard to find 2.0 phones too: curious that by any
definition of 'obsolete', 2.0 is more obsolete than 1.6. The Android
Market Dashboard, for example, shows no more than .1% of phones
connecting are using 2.0 -- if even that many.

So summing up: you are right to warn him that no one will consider
sample code or tutorial code to be broken just because it doesn't work
under 2.0. But we should all continue to test against it, except when
our applications require features not available under 2.0. But when we
test, since 2.0 is 'obsolete', we should not be overly concerned about
minor bugs that show up only in 2.0: worry only about crashers.

PS: after seeing the Dashboard, I decided testing against 2.0 is less
important than I thought at first. But the conclusion above stands: we
should still test against it. I will be keeping my 2.0 AVD, I just
won't spend much time on it now that I see how few 2.0 phones there
are out there. But I will still use it for quick testing before new
releases.

On Dec 30, 10:37 am, TreKing treking...@gmail.com wrote:
 On Sun, Dec 26, 2010 at 7:32 PM, 小浣熊 qianyan...@gmail.com wrote:
  These tutorials have the same proplem on displaying images on 2.0 device.

 2.0 is obsolete, AFAIK. Forget about it.

 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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


Re: [android-developers] Re: Image show problem

2010-12-30 Thread TreKing
On Thu, Dec 30, 2010 at 5:56 PM, Indicator Veritatis mej1...@yahoo.comwrote:

 Well, in a certain important sense, yes, 2.0 is 'obsolete'.


Well, it's more like in the official sense.
http://developer.android.com/resources/dashboard/platform-versions.html
* *Other: 0.1% of devices running obsolete versions*

2.0 would fall into the other category.

That is, most of us should develop using the latest Android 2.3 SDK, but
 continue to develop applications that will run well on 2.0, 2.1 and 2.2
 devices. Unless you need new bug fixes or new APIs available only in a later
 SDK, I would even say it should run on 1.6 devices.


Agreed - mostly. Hell, I still support 1.5 - but that's 6.3% usage,
according to that chart, which is still a pretty good number.
There are enough platform version X screen size configurations to worry
about with wasting time on one that's no longer really a consideration.


 PS: after seeing the Dashboard, I decided testing against 2.0 is
 less important than I thought at first. But the conclusion above stands:
 we should still test against it. I will be keeping my 2.0 AVD, I just won't
 spend much time on it now that I see how few 2.0 phones there are out there.
 But I will still use it for quick testing before new releases.


If you want to be that thorough, props to you - personally, I think it's a
waste of time. Particularly with the OP simply trying to run a sample app.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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

[android-developers] Re: Image doesn't appear from sqlite

2010-12-24 Thread DanH
What's varying?  The data won't be read back into the same address,
but into a new byte array, and [...@ is just a byte array at a
certain address.  Dump a few bytes of the arrays (eg, first and last
10) so you can compare their contents.

On Dec 22, 4:46 pm, Amiral 4mi...@gmail.com wrote:
 Hi all.

 I would like to save an image from Internet to database, I've tried to
 convert images into bytearray and store them in a database.

 Here my code:

 this is to created table:
 myDB.execSQL(CREATE TABLE IF NOT EXISTS News (Title VARCHAR(20),
 imageUrl BLOB, publishDate TIMESTAMP, expiredDate TIMESTAMP););

 and this is my Method to Insert table:

 public void insertlistNews(String city,byte[] newsImageUrl, String
 publishDate, String expiredDate){
 try {
  myDB.execSQL(INSERT INTO News
 (title,imageUrl,publishDate,expiredDate)
         +  VALUES (' + city + ',' + imageUrl + ',' + publishDate+
 ',' + expiredDate'););
         Log.i(Android, Table created);} catch (Exception e) {

         Log.i(Android, No Table created + e.getMessage());
         }
         //for check bytearray in database
         Log.i(Android, Image saved in database: + urlFrontImage);

 }

 The last my method for getNews from db:

 public ArrayList getAllNews() {
  ArrayList news = new ArrayListNews();
  Cursor c = myDB.rawQuery(SELECT
 title,imageUrl,publishDate,expiredDate
         FROM News WHERE publishedDate = DATETIME() and expiredDate =
 DATETIME() ORDER BY publishedDate DESC;, null);
  if (c != null) {
   c.moveToFirst();
   int count = 0;
   while (c.moveToNext()) {
    if (count == 0)
       c.moveToFirst();
    String title = c.getString(0);
    byte[] image = c.getBlob(1);
    String publishDate = c.getString(2);
    String expiredDate = c.getString(3);

    NewsItem nl = new NewsItem(title, image, publishDate, expiredDate);

    Log.i(Android, Image get from db: +image);
    news.add(nl);
    count++;
   }
  }
 return news;

 }

 when I run it the newsimage not appear and the Log like this:

 12-22 00:11:49.362: INFO/Android(307): Image saved in database:
 [...@437cbdb8
 12-22 00:11:51.052: INFO/Android(307): Image saved in database:
 [...@437db710
 12-22 00:11:51.862: INFO/Android(307): Image saved in database:
 [...@437c1338

 12-22 00:12:07.962: INFO/Android(307): Image get from db: [...@4382d370
 12-22 00:12:07.982: INFO/Android(307): Image get from db db:
 [...@4382d9c0
 12-22 00:12:07.992: INFO/Android(307): Image get from db: [...@4382e0e0

 why results can vary between insert and getNews?

 --
 Best Regards

 =
 Amiral

-- 
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


[android-developers] Re: Image does't appear from sqlite

2010-12-24 Thread DanH
The addresses vary because they're different objects.  You need to
dump some of the actual byte arrays to see if they're different.  You
could even write code to compare input and output.

On Dec 21, 6:40 pm, Muhammad Amiral 4mi...@gmail.com wrote:
 Hi all.

 I would like to save an image from Internet to database, I've tried to
 convert images into bytearray and store them in a database.

 Here my code:

 this is to created table:

  myDB.execSQL(CREATE TABLE IF NOT EXISTS News (Title VARCHAR(20), imageUrl
  BLOB, publishDate TIMESTAMP, expiredDate TIMESTAMP););

 and this is my Method to Insert table:

 public void insertlistNews(String city,byte[] newsImageUrl, String

  publishDate, String expiredDate){

 try {

  myDB.execSQL(INSERT INTO News (title,imageUrl,publishDate,expiredDate)

   +  VALUES (' + city + ',' + imageUrl + ',' + publishDate+ ',' +

  expiredDate'););

 Log.i(Android, Table created);

 } catch (Exception e) {

 Log.i(Android, No Table created + e.getMessage());

 }

 //for check bytearray in database

 Log.i(Android, Image saved in database: + urlFrontImage);

 }

 The last my method for getNews from db:

 public ArrayList getAllNews() {

  ArrayList news = new ArrayListNews();

  Cursor c = myDB.rawQuery(SELECT title,imageUrl,publishDate,expiredDate

 FROM News WHERE publishedDate = DATETIME() and expiredDate = DATETIME()

  ORDER BY publishedDate DESC;, null);

  if (c != null) {

   c.moveToFirst();

   int count = 0;

   while (c.moveToNext()) {

    if (count == 0)

       c.moveToFirst();

    String title = c.getString(0);

    byte[] image = c.getBlob(1);

    String publishDate = c.getString(2);

    String expiredDate = c.getString(3);

     NewsItem nl = new NewsItem(title, image, publishDate, expiredDate);

    Log.i(Android, Image get from db: +image);

    news.add(nl);

    count++;

   }

  }

 return news;

 }

 when I run it the newsimage not appear and the Log like this:

 12-22 00:11:49.362: INFO/Android(307): Image saved in database: [...@437cbdb8

 12-22 00:11:51.052: INFO/Android(307): Image saved in database: [...@437db710

 12-22 00:11:51.862: INFO/Android(307): Image saved in database: [...@437c1338

  12-22 00:12:07.962: INFO/Android(307): Image get from db: [...@4382d370

 12-22 00:12:07.982: INFO/Android(307): Image get from db db: [...@4382d9c0

 12-22 00:12:07.992: INFO/Android(307): Image get from db: [...@4382e0e0

 why results can vary between the insert and getNews?

 --
 Best Regards

 =
 Amiral

-- 
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


Re: [android-developers] Re: Image doesn't appear from sqlite

2010-12-24 Thread Kostya Vasilyev

+0.02 - this code:

public void insertlistNews(String city,*byte[] newsImageUrl*, String

 publishDate, String expiredDate){

[snip]

  +  VALUES (' + city + ',*' + imageUrl + '*,' + publishDate+
 ',' + expiredDate'););


appends a byte[] to a String.

This is the same as appending String.valueOf(imageUri), which calls 
byte[].toString, which *does not* return the contents of the array, but 
rather its type marker and address - which does look like [...@437c1338 
and so on.


If you want to insert byte[] values into the database, use one of:

- SQLiteStatement and bindBlob(int index, byte[] value)

- DatabaseUtils.InsertHelper and bind(int index, byte[] value)

- ContentValues, put(String key, byte[] value), and SQLiteDatabase.insert()

If you mean to insert the URL as a string, make sure you use a String 
variable for the URL to build your SQL statement.


Perhaps you are trying to do both (your code sample uses two different 
variable names: newsImageUrl and imageUrl), so do each one as described 
above.


-- Kostya

24.12.2010 20:13, DanH ?:

What's varying?  The data won't be read back into the same address,
but into a new byte array, and [...@ is just a byte array at a
certain address.  Dump a few bytes of the arrays (eg, first and last
10) so you can compare their contents.

On Dec 22, 4:46 pm, Amiral4mi...@gmail.com  wrote:

Hi all.

I would like to save an image from Internet to database, I've tried to
convert images into bytearray and store them in a database.

Here my code:

this is to created table:
myDB.execSQL(CREATE TABLE IF NOT EXISTS News (Title VARCHAR(20),
imageUrl BLOB, publishDate TIMESTAMP, expiredDate TIMESTAMP););

and this is my Method to Insert table:

public void insertlistNews(String city,byte[] newsImageUrl, String
publishDate, String expiredDate){
try {
  myDB.execSQL(INSERT INTO News
(title,imageUrl,publishDate,expiredDate)
 +  VALUES (' + city + ',' + imageUrl + ',' + publishDate+
',' + expiredDate'););
 Log.i(Android, Table created);} catch (Exception e) {

 Log.i(Android, No Table created + e.getMessage());
 }
 //for check bytearray in database
 Log.i(Android, Image saved in database: + urlFrontImage);

}

The last my method for getNews from db:

public ArrayList getAllNews() {
  ArrayList news = new ArrayListNews();
  Cursor c = myDB.rawQuery(SELECT
title,imageUrl,publishDate,expiredDate
 FROM News WHERE publishedDate= DATETIME() and expiredDate=
DATETIME() ORDER BY publishedDate DESC;, null);
  if (c != null) {
   c.moveToFirst();
   int count = 0;
   while (c.moveToNext()) {
if (count == 0)
   c.moveToFirst();
String title = c.getString(0);
byte[] image = c.getBlob(1);
String publishDate = c.getString(2);
String expiredDate = c.getString(3);

NewsItem nl = new NewsItem(title, image, publishDate, expiredDate);

Log.i(Android, Image get from db: +image);
news.add(nl);
count++;
   }
  }
return news;

}

when I run it the newsimage not appear and the Log like this:

12-22 00:11:49.362: INFO/Android(307): Image saved in database:
[...@437cbdb8
12-22 00:11:51.052: INFO/Android(307): Image saved in database:
[...@437db710
12-22 00:11:51.862: INFO/Android(307): Image saved in database:
[...@437c1338

12-22 00:12:07.962: INFO/Android(307): Image get from db: [...@4382d370
12-22 00:12:07.982: INFO/Android(307): Image get from db db:
[...@4382d9c0
12-22 00:12:07.992: INFO/Android(307): Image get from db: [...@4382e0e0

why results can vary between insert and getNews?

--
Best Regards

=
Amiral



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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

[android-developers] Re: image resolutions and scaling

2010-11-24 Thread Vinay
Hai All,

Adding on to this thread, since I facing an issue very much related to
this.

I did go through the Multiple screen support document:
http://developer.android.com/guide/practices/screens_support.html

I'm using freescale imx51 board connected to a DELL 14 TFT monitor.
The default applications do appear full screen. But when I port my
custom application it renders in compatibility mode.

I have all the three folders (hdpi, ldpi, mdpi) holding density
specific images.

First I tested my application on the emulator (Medium Density / Normal
Screen). Hence my image size were specific to 480X320 (Landscape
mode). I generated hdpi and ldpi images as stated in earlier post:
hdpi = 1.5 x mdpi
ldpi = 0.75 x mdpi

Why is the custom application not being rendered full screen like all
other default application. Why are images not being scaled to fit the
DELL 14 monitor connected to the imx51 board.

Thanks for any help.

Vinay.


On Nov 4, 10:07 pm, Daniel Drozdzewski daniel.drozdzew...@gmail.com
wrote:
 From the following guideline:

 http://developer.android.com/guide/practices/ui_guidelines/icon_desig...

 relation between sizes are:

 hdpi = 1.5 x mdpi
 ldpi = 0.75 x mdpi

 Daniel



 On Thu, Nov 4, 2010 at 4:50 PM, ping bernd.warm...@gmail.com wrote:
  Hello,
  In order to ensure that my app looks good on devices with different
  screens I have to store my images (icons, etc,..) in the three folders
  for ldpi, mdpi and hdpi so that android can scale the images, right?
  Now how do i know which resolution the single pictures must have? For
  example I have two images for a navigation bar. Now I store these
  images for instance with size 60x60 in the hdpi folder which sizes
  do i have to choose for the mdpi and the ldpi folder? how do I know
  this?

  greets

  --
  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

 --
 Daniel Drozdzewski

-- 
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


[android-developers] Re: Image loading from remote problem

2010-11-17 Thread umakantpatil
No one in the form knows the answer ?
weired :(

On Nov 14, 10:38 pm, umakantpatil umakantpat...@gmail.com wrote:
 Thanks Kumar,
 I said it previous that i know i can load it async or in new thread.
 But after getting the image I don't know how to replace that image
 back in textview.

 Can you help me with small piece of code that how can i do it ?

 On Oct 27, 4:05 pm, Kumar Bibek coomar@gmail.com wrote:







  Do the fetching image part in a thread. That will solve your problem.

  On Wed, Oct 27, 2010 at 4:25 PM, umakantpatil 
  umakantpat...@gmail.comwrote:

   I have HTML text, I need to show it in textview. I did it. There are
   some images in it. I also made ImageGetter
   which loads image from remote server and displays it. But the issue is
   now its very slow.
   I know i can load it async. But i haven't got a single example or help
   for this.

   Below is the code to get the image

   �...@override
                  public Drawable getDrawable(String source) {
                          Drawable drawable = null;
                          Bitmap bitmap = null;
                      InputStream in = null;
                      BufferedOutputStream out = null;
                      try {
                              in = new BufferedInputStream(new
   URL(source).openStream(),4096);
                          final ByteArrayOutputStream dataStream = new
   ByteArrayOutputStream();
                          out = new BufferedOutputStream(dataStream, 4096);
                          copy(in, out);
                          out.flush();
                          final byte[] data = dataStream.toByteArray();
                          bitmap = BitmapFactory.decodeByteArray(data, 0,
   data.length);
                          drawable = new BitmapDrawable(bitmap);

                              int width = getScreen();
                              int fin = width - 120;

                          drawable.setBounds(0, 0, fin, 200);
                          return drawable;
                      }catch (Throwable e) {
                          return null;
                  }
   }

   Can any one tell my how can get it async without stopping UI?

   --
   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.comandroid-developers%2Bunsubs
cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
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


[android-developers] Re: Image loading from remote problem

2010-11-17 Thread Kumar Bibek
http://techdroid.kbeanie.com/2010/06/textview-with-html-content.html

On Nov 17, 6:17 pm, umakantpatil umakantpat...@gmail.com wrote:
 No one in the form knows the answer ?
 weired :(

 On Nov 14, 10:38 pm, umakantpatil umakantpat...@gmail.com wrote:

  Thanks Kumar,
  I said it previous that i know i can load it async or in new thread.
  But after getting the image I don't know how to replace that image
  back in textview.

  Can you help me with small piece of code that how can i do it ?

  On Oct 27, 4:05 pm, Kumar Bibek coomar@gmail.com wrote:

   Do the fetching image part in a thread. That will solve your problem.

   On Wed, Oct 27, 2010 at 4:25 PM, umakantpatil 
   umakantpat...@gmail.comwrote:

I have HTML text, I need to show it in textview. I did it. There are
some images in it. I also made ImageGetter
which loads image from remote server and displays it. But the issue is
now its very slow.
I know i can load it async. But i haven't got a single example or help
for this.

Below is the code to get the image

�...@override
               public Drawable getDrawable(String source) {
                       Drawable drawable = null;
                       Bitmap bitmap = null;
                   InputStream in = null;
                   BufferedOutputStream out = null;
                   try {
                           in = new BufferedInputStream(new
URL(source).openStream(),4096);
                       final ByteArrayOutputStream dataStream = new
ByteArrayOutputStream();
                       out = new BufferedOutputStream(dataStream, 4096);
                       copy(in, out);
                       out.flush();
                       final byte[] data = dataStream.toByteArray();
                       bitmap = BitmapFactory.decodeByteArray(data, 0,
data.length);
                       drawable = new BitmapDrawable(bitmap);

                           int width = getScreen();
                           int fin = width - 120;

                       drawable.setBounds(0, 0, fin, 200);
                       return drawable;
                   }catch (Throwable e) {
                       return null;
               }
}

Can any one tell my how can get it async without stopping UI?

--
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.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
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


[android-developers] Re: Image loading from remote problem

2010-11-17 Thread umakantpatil
Kumar,
I have already checked your pages. Its shows example for drawable
which you have on mobile.
I want to load remote image. As remote image loading takes long time.
UI hangs up till the time.

I have also seen that you have written saying that we can pass null
and open new thread which downloads image to local.
Replace's the path to local file in html and then reset the text in
TextView.

This works fine when textview has one image but when our text has 2/3
img tags. Each time getter is called and 2/3 new threads get open and
2/3 times text is reset.
Lets imagine case where means while image downloads in new thread then
user goes to other activity and the one which we opened is destroyed.
Also the case where in same acitivty i have 2/3 pages like which has
next and prev button. So the image comes bit late and then the thread
will take other text and replace it somewhere else

I dont know but Im going it in big confusion. Is there some direct
widget for this ?

I dont want to use webview as I have some other things which gets
disturb because of webview. Need to it in textview only.


On Nov 17, 6:26 pm, Kumar Bibek coomar@gmail.com wrote:
 http://techdroid.kbeanie.com/2010/06/textview-with-html-content.html

 On Nov 17, 6:17 pm, umakantpatil umakantpat...@gmail.com wrote:







  No one in the form knows the answer ?
  weired :(

  On Nov 14, 10:38 pm, umakantpatil umakantpat...@gmail.com wrote:

   Thanks Kumar,
   I said it previous that i know i can load it async or in new thread.
   But after getting the image I don't know how to replace that image
   back in textview.

   Can you help me with small piece of code that how can i do it ?

   On Oct 27, 4:05 pm, Kumar Bibek coomar@gmail.com wrote:

Do the fetching image part in a thread. That will solve your problem.

On Wed, Oct 27, 2010 at 4:25 PM, umakantpatil 
umakantpat...@gmail.comwrote:

 I have HTML text, I need to show it in textview. I did it. There are
 some images in it. I also made ImageGetter
 which loads image from remote server and displays it. But the issue is
 now its very slow.
 I know i can load it async. But i haven't got a single example or help
 for this.

 Below is the code to get the image

 �...@override
                public Drawable getDrawable(String source) {
                        Drawable drawable = null;
                        Bitmap bitmap = null;
                    InputStream in = null;
                    BufferedOutputStream out = null;
                    try {
                            in = new BufferedInputStream(new
 URL(source).openStream(),4096);
                        final ByteArrayOutputStream dataStream = new
 ByteArrayOutputStream();
                        out = new BufferedOutputStream(dataStream, 
 4096);
                        copy(in, out);
                        out.flush();
                        final byte[] data = dataStream.toByteArray();
                        bitmap = BitmapFactory.decodeByteArray(data, 0,
 data.length);
                        drawable = new BitmapDrawable(bitmap);

                            int width = getScreen();
                            int fin = width - 120;

                        drawable.setBounds(0, 0, fin, 200);
                        return drawable;
                    }catch (Throwable e) {
                        return null;
                }
 }

 Can any one tell my how can get it async without stopping UI?

 --
 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.comandroid-developers%2Bunsubs
  cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
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


Re: [android-developers] Re: Image loading from remote problem

2010-11-17 Thread Kumar Bibek
Well, I cannot write up the whole code for this, but I am sure it's quite
possible to do what you are saying.

On Wed, Nov 17, 2010 at 7:31 PM, umakantpatil umakantpat...@gmail.comwrote:

 Kumar,
 I have already checked your pages. Its shows example for drawable
 which you have on mobile.
 I want to load remote image. As remote image loading takes long time.
 UI hangs up till the time.

 I have also seen that you have written saying that we can pass null
 and open new thread which downloads image to local.
 Replace's the path to local file in html and then reset the text in
 TextView.

 This works fine when textview has one image but when our text has 2/3
 img tags. Each time getter is called and 2/3 new threads get open and
 2/3 times text is reset.
 Lets imagine case where means while image downloads in new thread then
 user goes to other activity and the one which we opened is destroyed.
 Also the case where in same acitivty i have 2/3 pages like which has
 next and prev button. So the image comes bit late and then the thread
 will take other text and replace it somewhere else

 I dont know but Im going it in big confusion. Is there some direct
 widget for this ?

 I dont want to use webview as I have some other things which gets
 disturb because of webview. Need to it in textview only.


 On Nov 17, 6:26 pm, Kumar Bibek coomar@gmail.com wrote:
  http://techdroid.kbeanie.com/2010/06/textview-with-html-content.html
 
  On Nov 17, 6:17 pm, umakantpatil umakantpat...@gmail.com wrote:
 
 
 
 
 
 
 
   No one in the form knows the answer ?
   weired :(
 
   On Nov 14, 10:38 pm, umakantpatil umakantpat...@gmail.com wrote:
 
Thanks Kumar,
I said it previous that i know i can load it async or in new thread.
But after getting the image I don't know how to replace that image
back in textview.
 
Can you help me with small piece of code that how can i do it ?
 
On Oct 27, 4:05 pm, Kumar Bibek coomar@gmail.com wrote:
 
 Do the fetching image part in a thread. That will solve your
 problem.
 
 On Wed, Oct 27, 2010 at 4:25 PM, umakantpatil 
 umakantpat...@gmail.comwrote:
 
  I have HTML text, I need to show it in textview. I did it. There
 are
  some images in it. I also made ImageGetter
  which loads image from remote server and displays it. But the
 issue is
  now its very slow.
  I know i can load it async. But i haven't got a single example or
 help
  for this.
 
  Below is the code to get the image
 
   @Override
 public Drawable getDrawable(String source) {
 Drawable drawable = null;
 Bitmap bitmap = null;
 InputStream in = null;
 BufferedOutputStream out = null;
 try {
 in = new BufferedInputStream(new
  URL(source).openStream(),4096);
 final ByteArrayOutputStream dataStream =
 new
  ByteArrayOutputStream();
 out = new BufferedOutputStream(dataStream,
 4096);
 copy(in, out);
 out.flush();
 final byte[] data =
 dataStream.toByteArray();
 bitmap =
 BitmapFactory.decodeByteArray(data, 0,
  data.length);
 drawable = new BitmapDrawable(bitmap);
 
 int width = getScreen();
 int fin = width - 120;
 
 drawable.setBounds(0, 0, fin, 200);
 return drawable;
 }catch (Throwable e) {
 return null;
 }
  }
 
  Can any one tell my how can get it async without stopping UI?
 
  --
  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.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 
 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com

-- 
You received this message because you 

[android-developers] Re: Image loading from remote problem

2010-11-14 Thread umakantpatil
Thanks Kumar,
I said it previous that i know i can load it async or in new thread.
But after getting the image I don't know how to replace that image
back in textview.

Can you help me with small piece of code that how can i do it ?

On Oct 27, 4:05 pm, Kumar Bibek coomar@gmail.com wrote:
 Do the fetching image part in a thread. That will solve your problem.

 On Wed, Oct 27, 2010 at 4:25 PM, umakantpatil umakantpat...@gmail.comwrote:











  I have HTML text, I need to show it in textview. I did it. There are
  some images in it. I also made ImageGetter
  which loads image from remote server and displays it. But the issue is
  now its very slow.
  I know i can load it async. But i haven't got a single example or help
  for this.

  Below is the code to get the image

  �...@override
                 public Drawable getDrawable(String source) {
                         Drawable drawable = null;
                         Bitmap bitmap = null;
                     InputStream in = null;
                     BufferedOutputStream out = null;
                     try {
                             in = new BufferedInputStream(new
  URL(source).openStream(),4096);
                         final ByteArrayOutputStream dataStream = new
  ByteArrayOutputStream();
                         out = new BufferedOutputStream(dataStream, 4096);
                         copy(in, out);
                         out.flush();
                         final byte[] data = dataStream.toByteArray();
                         bitmap = BitmapFactory.decodeByteArray(data, 0,
  data.length);
                         drawable = new BitmapDrawable(bitmap);

                             int width = getScreen();
                             int fin = width - 120;

                         drawable.setBounds(0, 0, fin, 200);
                         return drawable;
                     }catch (Throwable e) {
                         return null;
                 }
  }

  Can any one tell my how can get it async without stopping UI?

  --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

-- 
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


[android-developers] Re: Image Zomming using finger touch.

2010-09-24 Thread Spiral123
The Sony Ericsson guys did a tutorial on this:
http://blogs.sonyericsson.com/developerworld/2010/05/18/android-one-finger-zoom-tutorial-part-1/

On Sep 23, 3:31 pm, Ajmer Singh ajmersing...@gmail.com wrote:
 Hi All

 I need to implement the Image zoom in and zoom out functionality using the
 finger touch,like we have it in Android  phone Image gallery,
 Please let me know how can i do this in my app.Does any had done this
 before.

 Please help.

 --
 Thanks and Regards
 Ajmer Singh

-- 
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


Re: [android-developers] Re: Image Zomming using finger touch.

2010-09-24 Thread Ajmer singh
Hi

Thanks for your reply it did help a lot.


On Fri, Sep 24, 2010 at 5:53 PM, Spiral123 cumis...@gmail.com wrote:

 The Sony Ericsson guys did a tutorial on this:

 http://blogs.sonyericsson.com/developerworld/2010/05/18/android-one-finger-zoom-tutorial-part-1/

 On Sep 23, 3:31 pm, Ajmer Singh ajmersing...@gmail.com wrote:
  Hi All
 
  I need to implement the Image zoom in and zoom out functionality using
 the
  finger touch,like we have it in Android  phone Image gallery,
  Please let me know how can i do this in my app.Does any had done this
  before.
 
  Please help.
 
  --
  Thanks and Regards
  Ajmer Singh

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
*Thanks and Regards
Ajmer Singh*

-- 
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

[android-developers] Re: Image uploading to the device

2010-09-23 Thread Francisco
I forgot to mention that my application will be the only one using
this data so I don't know if a content provider is necesary and i dont
know if using a content provider will allow other applications to view
my images, i wouldnt like my application images to be viewed from the
pictures gallery for example.

-- 
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


  1   2   3   >