Thursday, 5 November 2015

image quality - Motorola Razr Maxx compression removal


I've recently acquired a Motorola Razr Maxx. I had hoped its camera would be good for those random shots of opportunity, but unfortunately its quality seems crippled by overzealous JPEG compression. Most of my shots sport visible compression artifacts, and the files are all between 1 and 3 kB.


The stock UI does not seem to have any options to set the compression level. Does anyone know of an easy procedure to allow the compression level to be changed?



Answer



There's a bit of a bug in the way Motorola set up the camera profiles on the RAZR (and many other phones in the same family, all of which use a near-identical load of Android) that causes images to be compressed a lot more than they should be.


The problem can be corrected by rooting the phone and making some minor modifications to a configuration file. How to root and modify files on your phone go beyond the scope of this site, but I've included details of what to modify the end of this answer. I've done this modification on multiple devices including my Droid 4, and it does make a difference at the expense of making the files much larger. The same change works on most other Android devices, which will have a similar file.


Android is actually capable of providing "raw" images to applications, but the hardware has to support it and the format is left up to the manufacturer. Most handsets and tablets are powered by a "system on a chip" that does all of the JPEG compression and hands the finished product off to Android. The only real option for Android applications is to set the JPEG quality.


EDIT: This problem does not appear to have been fixed in the Android 4.0.4 load which is being rolled to RAZR and Droid models.





Use the following information at your own risk.


Copy the file /system/etc/media_profiles.xml to /system/etc/media_profiles.xml-ORIG and retain the copy. You will need to restore the original file in order to install future system updates.


In the file /system/etc/media_profiles.xml:


About 30 lines from the top, change




to





Further down in the file, there is one block of lines for each camera (rear, front) that looks like the following:







To disable compression completely, change all of the quality values to 100. Change the the memCap to at least twice the number of megapixels in your device's camera. Larger will not improve the quality of your photos; smaller will force Android to pick a compression value that makes the image fit into that number of bytes.


After making the change, reboot your device.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...