ExifTool Version Number         : 7.67
File Name                       : road_trip_1.jpg
Directory                       : .
File Size                       : 107 kB
File Modification Date/Time     : 2009:02:10 13:43:31+00:00
File Type                       : JPEG
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Image Width                     : 2048
Image Height                    : 1536
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 2048x1536

Thats all the info i can pull using exiftool from the command line.

George

On Feb 10, 7:46 am, Dave Sparks <davidspa...@android.com> wrote:
> That looks reasonable to me. What are you using to read back the EXIF
> data?
>
> I was just working on the EXIF code over the weekend fixing a few bugs
> for the G1. I know that this code is working (the bugs I fixed were
> conversion errors, not missing data). I use exiftool to dump the EXIF
> tags.
>
> On Feb 9, 9:57 am, George <she...@gmail.com> wrote:
>
> > I've been playing with the parameter code for most of today, can't
> > seem to get it to save any exif data. Even if i manually set lat /
> > long, it doesn't save anything. The parameter code you posted accounts
> > for the gps related exif information, but what of the rest? I can't
> > see where it's setting the rest of the data.
>
> > Here's the bit of code where i try to set the parameters. Should this
> > be else where?
>
> > Thanks,
>
> > George
>
> >                 if (keyCode == KeyEvent.KEYCODE_SPACE) {
>
> >                         android.hardware.Camera.Parameters parameters =
> > mCamera.getParameters();
>
> >                         parameters.set("jpeg-quality", 85);
>
> >                         parameters.remove("gps-latitude");
> >                         parameters.remove("gps-longitude");
> >                         parameters.remove("gps-altitude");
> >                         parameters.remove("gps-timestamp");
>
> >                         parameters.set("gps-latitude","51.49473309516907");
> >                         parameters.set("gps-longitude", "-1.0");
> >                         parameters.set("gps-altitude", "71.0"); // meters
> >                         parameters.set("gps-timestamp", "1233744883");
>
> >                         mCamera.setParameters(parameters);
>
> >                         mCamera.takePicture(null, null, mPictureCallback);
>
> >                         return true;
> >                 }
>
> >                 return false;
> >         }
>
> > On Feb 6, 6:16 pm, Dave Sparks <davidspa...@android.com> wrote:
>
> > > Here's some code I grabbed from thecameraapp. In this case, the EXIF
> > > data is pre-encoded in the JPEG - no need to rewrite the file.
>
> > >         private void capture(boolean captureOnly) {
> > >             mPreviewing = false;
> > >             mCaptureOnlyBitmap = null;
>
> > >             final int latchedOrientation =
> > > ImageManager.roundOrientation(mLastOrientation + 90);
>
> > >             Boolean recordLocation = mPreferences.getBoolean
> > > ("pref_camera_recordlocation_key", false);
> > >             Location loc = recordLocation ? getCurrentLocation() :
> > > null;
> > >             android.hardware.Camera.Parameters parameters =
> > > mCameraDevice.getParameters();
> > >             // Quality 75 has visible artifacts, and quality 90 looks
> > > great but the files begin to
> > >             // get large. 85 is a good compromise between the two.
> > >             parameters.set("jpeg-quality", 85);
> > >             parameters.set("rotation", latchedOrientation);
>
> > >             parameters.remove("gps-latitude");
> > >             parameters.remove("gps-longitude");
> > >             parameters.remove("gps-altitude");
> > >             parameters.remove("gps-timestamp");
>
> > >             if (DEBUG_FAKE_GPS_LOCATION) {
> > >                 // Google London office, having trouble encoding
> > > longitude
>
> > >                 if (false) {
> > >                     // This fails:
> > >                     parameters.set("gps-latitude",
> > > "51.49473309516907");
> > >                     parameters.set("gps-longitude",
> > > "-0.14598190784454346");
> > >                     parameters.set("gps-altitude", "71.0"); // meters
> > >                     parameters.set("gps-timestamp", "1233744883");
> > >                 } else {
> > >                     // This works OK:
> > >                     parameters.set("gps-latitude",
> > > "51.49473309516907");
> > >                     parameters.set("gps-longitude", "-1.0");
> > >                     parameters.set("gps-altitude", "71.0"); // meters
> > >                     parameters.set("gps-timestamp", "1233744883");
> > >                 }
> > >             } else if (loc != null) {
> > >                 double lat = loc.getLatitude();
> > >                 double lon = loc.getLongitude();
> > >                 boolean hasLatLon = (lat != 0.0d) || (lon != 0.0d);
>
> > >                 if (hasLatLon) {
> > >                     String latString = String.valueOf(lat);
> > >                     String lonString = String.valueOf(lon);
> > >                     parameters.set("gps-latitude",  latString);
> > >                     parameters.set("gps-longitude", lonString);
> > >                     if (loc.hasAltitude())
> > >                         parameters.set("gps-altitude",  String.valueOf
> > > (loc.getAltitude()));
> > >                     if (loc.getTime() != 0) {
> > >                         // Location.getTime() is UTC in milliseconds.
> > >                         // gps-timestamp is UTC in seconds.
> > >                         long utcTimeSeconds = loc.getTime() / 1000;
> > >                         parameters.set("gps-timestamp", String.valueOf
> > > (utcTimeSeconds));
> > >                     }
> > >                 } else {
> > >                     loc = null;
> > >                 }
> > >             }
>
> > >             Size pictureSize = parameters.getPictureSize();
>
> > >             // resize the SurfaceView to the aspect-ratio of the still
> > > image
> > >             // and so that we can see the full image that was taken
> > >             mSurfaceView.setAspectRatio(pictureSize.width,
> > > pictureSize.height);
>
> > >             mCameraDevice.setParameters(parameters);
>
> > >             mCameraDevice.takePicture(mShutterCallback,
> > > mRawPictureCallback, new JpegPictureCallback(loc));
>
> > >             mBlackout.setVisibility(View.VISIBLE);
> > >             // Comment this out for now until we can decode the
> > > preview frame. This currently
> > >             // just animates black-on-black because the surface
> > > flinger blacks out the surface
> > >             // when thecameradriver detaches the buffers.
> > >             if (false) {
> > >                 Animation a = new
> > > android.view.animation.TranslateAnimation(mBlackout.getWidth(), 0 , 0,
> > > 0);
> > >                 a.setDuration(450);
> > >                 a.startNow();
> > >                 mBlackout.setAnimation(a);
> > >             }
> > >         }
>
> > > On Feb 6, 9:00 am, George <she...@gmail.com> wrote:
>
> > > > I've found the ExifInterface class in thecamerasource code which
> > > > takes a file name as a string. I cant figure how to get the file name
> > > > of the image i've just taken? I dont really want to have to save the
> > > > image to reload it again, anyway of pointing to the 'bm' jpeg picture
> > > > object?
>
> > > > Thanks again,
>
> > > > George
>
> > > > public void onPictureTaken(byte[] data,Camerac) {
>
> > > >                         Bitmap bm = BitmapFactory.decodeByteArray(data, 
> > > > 0, data.length);
>
> > > >                         // Save the name and description in a map. Key 
> > > > is the content
> > > >                         // provider's
> > > >                         // column name, value is the value to save in 
> > > > that record field.
> > > >                         ContentValues values = new ContentValues(3);
> > > >                         // set name to date + time
> > > >                         // description - current goal?
> > > >                         
> > > > values.put(MediaStore.Images.Media.DISPLAY_NAME, "Picture");
> > > >                         values.put(MediaStore.Images.Media.DESCRIPTION, 
> > > > "taken with g1");
> > > >                         values.put(MediaStore.Images.Media.MIME_TYPE, 
> > > > "image/jpeg");
> > > >                         
> > > > //values.put(MediaStore.Images.ImageColumns.DESCRIPTION, "THIS IS
> > > > EXIF DATA" );
> > > >                         //values.put(MediaStore.Images.ImageColumns., 
> > > > "THIS IS EXIF
> > > > DATA" );
>
> > > >                         
> > > > //values.put(MediaStore.Images.ImageColumns.LATITUDE, value);
> > > >                     
> > > > //values.put(MediaStore.Images.ImageColumns.LONGITUDE, value);
> > > >                     
> > > > //values.put(MediaStore.Images.ImageColumns.ORIENTATION, value);
>
> > > >                         // Add a new record without the bitmap, but 
> > > > with the values.
> > > >                         // It returns the URI of the new record.
> > > >                         Uri uri = getContentResolver().insert(
> > > >                                         
> > > > MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
>
> > > >                         try {
> > > >                                 // Now get a handle to the file for 
> > > > that record, and save the
> > > >                                 // data into it.
> > > >                                 // sourceBitmap is a Bitmap object 
> > > > representing the file to save
> > > >                                 // to the database.
> > > >                                 OutputStream outStream =
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to