Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Number22
Old
(Last edited by Number22; 18th July 2011 at 09:20 PM.) Reason: Various important updates
#1  
Member - OP
Thanks Meter 15
Posts: 91
Join Date: Feb 2009
Location: Zagreb

 
DONATE TO ME
Angry [MOD/PATCH] Gallery3D higher res | Development stopped

Development stopped
Although this mod had great success with several thousands of different users, just as everything else, it has been surpassed by time. Since it was first introduced, many competent devs made great changes to the Gallery3D's functions. These changes made it hard to keep up with the latest developments without introducing bugs, and due to the lack of time, I might have neglected it sometimes. Luckily, this mod has already been in CyanogenMod for a while, meaning all of it's users got the latest and greatest of this mod, as well as others. So instead of patching the Gallery manually, check out the latest version of CyanogenMod.
If you want to use this in other custom ROMs, either point your devs to this post and ask them to compile in the relevant changes from the github link, or extract the apk from the latest CyanogenMod since it will contain many more fixes and performance improvements that have been added in the last few months.


Thanks to all who contributed to this project!

__________________

UPDATE 12.2.2011.
Well, thanks to user de_MarK, the black borders problem has now been fixed! Should be working on most devices without any problems.
Thanks again!

[Comparison]
Here is a demo of how this will improve your images if you don't touch VMMaxHeapSize. If you do increase the former, expect even better results.
I found an image of a transmitter on top of a building to be best for comparison since it has very high contrast and sharp lines. Screenshots were taken off my Desire using DDMS.
http://img576.imageshack.us/img576/9...dpatchdemo.png
Notice how the transmitter and power cables look differently.
The original photo (5mpx) is here:
http://img838.imageshack.us/img838/6189/imag0106z.jpg

[Will it work?]
Reported to work on various devices and various ROMs. If, by any chance, this doesn't work on your phone, report here.
User Airwalker82 reported that even 12MPx images are loaded without problems. Thanks for that!

[Installation]
If your ROM didn't come with Gallery3D preinstalled:
Uninstall any versions of Gallery3D present and install the .apk.
If your ROM came with Gallery3D or the above method fails:
You will need to remove the existing Gallery3D.apk in /system/app. You can use any method you prefer for this, however, those owning a Desire will have to do it from recovery through ADB shell.
Code:
Step by step:
1) Connect the phone to the PC
2) Open a Command Prompt (WinKey+R->type 'cmd'->enter)
3) Using the command 'cd', navigate to the directory where the Android SDK is installed
4) Use 'cd' again to enter the 'tools' directory
5) Type 'adb reboot recovery'
6) The phone should restart
7) Once in recovery, type 'adb shell' to get the shell interface
8) Now type 'rm -rf /system/app/Gallery3D.*'
9) Disconnect and reboot the phone
Now simply install the .apk.

[Source]
All source code (with compiled downloads) is available on github at the following URL:
http://github.com/mrPjer/android_pac...apps_Gallery3D

[Other/Bugs]
Please post here any bugs, errors or words of praise

Gallery3Dr.apk
Only install this one on devices that have problem with rotation (such as the HTC Hero).
Attached Files
File Type: apk Gallery3D.apk - [Click for QR Code] (603.8 KB, 4495 views)
File Type: apk Gallery3Dr.apk - [Click for QR Code] (603.8 KB, 810 views)
The Following 7 Users Say Thank You to Number22 For This Useful Post: [ Click to Expand ]
 
dnlgee
Old
#2  
dnlgee's Avatar
Senior Member
Thanks Meter 79
Posts: 982
Join Date: May 2010
Location: Newcastle

 
DONATE TO ME
Quote:
Originally Posted by Number22 View Post
'sup guys!
[You can skip the text, download and demo are below]

I don't know how many of you have noticed, but, although beautiful, Gallery3D doesn't really load images at their full resolution, unlike the default Sense Gallery. Infact, the difference is quite dramatic on my phone. So, today I decided to get the sources and see if something can be done. And indeed it can!
So I present to you my patched version of Gallery 3D!
Although I couldn't manage to get it to load full res images, the difference is quite noticeable (but it isn't anything like Sense )
Anyhow, what's going on here? As some of you may or may not know, Android has a VERY limited amount of memory allocated for bitmaps which are necessary for showing images. For an example, even with the best phones today, you can't load a 5mpx image as a bitmap. That's why Gallery3D downscales images when loading them. The problem is, it doesn't upscale them when zooming in! So, what I did is I downloaded the latest sources from AOSP and changed the downscaling algorithm a bit so the images are downscaled 2x less (which equals to 4x more detail). Now, since I only have my Desire at hand, I couldn't really test this properly, however, this should experience no problems with images that are 5mpx (that's what I was able to test).
I would, however, like you to try and load some larger images (something of a DSLR, like 10mpx) and report on how it works.

[Comparison]
I found an image of a transmitter on top of a building to be best for comparison since it has very high contrast and sharp lines. Screenshots were taken off my Desire using DDMS.
http://img576.imageshack.us/img576/9...dpatchdemo.png
Notice how the transmitter and power cables look differently.
The original photo (5mpx) is here:
http://img838.imageshack.us/img838/6189/imag0106z.jpg

[INSTALLATION] Uninstall any previous versions and install the .apk. This was built for Android 2.2 off AOSP
Works on official FroYo. Report how it works on other ROMs.

[OTHER]
Please post here any bugs, errors or words of praise
Oh yeah, I removed some resources that the Desire doesn't use, so it's somewhat smaller in size
Good work =)
 
x01a4
Old
#3  
x01a4's Avatar
Senior Member
Thanks Meter 25
Posts: 184
Join Date: May 2010
Quote:
Originally Posted by Number22 View Post
[INSTALLATION] Uninstall any previous versions and install the .apk.
Yeah! Thanks for that...

we need to uninstall the old gallery via adb i assume?
 
r47z
Old
#4  
r47z's Avatar
Senior Member
Thanks Meter 210
Posts: 957
Join Date: Apr 2010
Works great thx!
HTC Desire A8181 with MIUI
Samsung Galaxy S2 w/ Resurrection Remix
Samsung Galaxy Nexus GSM w/ JellyBean
 
Number22
Old
#5  
Member - OP
Thanks Meter 15
Posts: 91
Join Date: Feb 2009
Location: Zagreb

 
DONATE TO ME
Quote:
Originally Posted by x01a4
we need to uninstall the old gallery via adb i assume?
Can't say for sure. It wouldn't install for me over the default one I had installed. However, if it came with your ROM, you just might be able to overwrite it. Try it and report back
 
Airwalker82
Old
#6  
Member
Thanks Meter 1
Posts: 35
Join Date: Apr 2010
14.1 mpx images look great in the thumbs! A bit slow on initial load, but seems ok after that.

Does anyone know of a screenshot application that can run on non-rooted devices? I'd like to take a screenshot so I can show how the 14.1 mpx thumbs show up like.

One thing though - It picks up album art, and as a result I have numerout galleries showing that are just an artist/album folder. Is there a way to include options that allow you to select which albums to show/hide?

thanks for the great work!
 
patachon33
Old
#7  
Junior Member
Thanks Meter 0
Posts: 25
Join Date: May 2010
Works great on defrost 2.6a rom!

Nice dude !
 
Number22
Old
#8  
Member - OP
Thanks Meter 15
Posts: 91
Join Date: Feb 2009
Location: Zagreb

 
DONATE TO ME
Quote:
Originally Posted by Airwalker82 View Post
14.1 mpx images look great in the thumbs! A bit slow on initial load, but seems ok after that.
That's good to hear

Quote:
Originally Posted by Airwalker82 View Post
Does anyone know of a screenshot application that can run on non-rooted devices? I'd like to take a screenshot so I can show how the 14.1 mpx thumbs show up like.
DDMS from the Android SDK should work on non-rooted devices. (Nice guide here: http://www.androidcentral.com/taking...s-without-root) Just remember, if you are on Linux, you need to start it as root.

Quote:
Originally Posted by Airwalker82 View Post
One thing though - It picks up album art, and as a result I have numerout galleries showing that are just an artist/album folder. Is there a way to include options that allow you to select which albums to show/hide?
Hmm, well, no way of including the show/hide without some serious rewriting. However, if the album art is in it's separate folder, you could try the .nomedia trick (just be careful and make sure the folder is empty before applying .nomedia). If it isn't, the best option might be to just encode art directly into the mp3 tag. Some of my MP3s have album art in their tags so it doesn't show up in Gallery.
This isn't a problem of the app itself, more of the Android Content Provider for media which scans all folders for images, videos and songs.

Quote:
Originally Posted by Airwalker82 View Post
thanks for the great work!
Np

Quote:
Originally Posted by patachon33
Works great on defrost 2.6a rom!
Nice to hear that
The Following User Says Thank You to Number22 For This Useful Post: [ Click to Expand ]
 
mikel.1969
Old
#9  
Junior Member
Thanks Meter 1
Posts: 28
Join Date: May 2010
i have made a zip file from this so you can install this via the recovery shell, it will overwrite the original "Gallery3D.apk" file in /system/app

tested and confirmed working in OpenDesire 3.1.0
Attached Files
File Type: zip Gallery3Dm.zip - [Click for QR Code] (504.1 KB, 1843 views)
The Following User Says Thank You to mikel.1969 For This Useful Post: [ Click to Expand ]
 
Number22
Old
#10  
Member - OP
Thanks Meter 15
Posts: 91
Join Date: Feb 2009
Location: Zagreb

 
DONATE TO ME
Quote:
Originally Posted by mikel.1969 View Post
i have made a zip file from this so you can install this via the recovery shell, it will overwrite the original "Gallery3D.apk" file in /system/app

tested and confirmed working in OpenDesire 3.1.0
Thanks, I linked it in the first post.

 
Post Reply+
Tags
desire 2.2, gallery3d resolution
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...