Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
HJ200
Old
(Last edited by HJ200; 17th October 2012 at 10:09 AM.)
#1  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Prompt [API]3D Interlace library

Hi folks,

A lot of people asked for the code to interlace images (used for the 3D Wallpaper Picker).

So here's a library to use in your own code projects.

License:
Free, as long as you mention my username in the credits. I also would like to know via PM if you published any app using it

Projects currently using this lib
[APP][v2.5] 3D Wallpapers picker
[liveWallpaper][evoStereo3D] JellyBeansGLES2 3D customizable interactive
[APP] [SENSE 4.0/4.1] Gallery 3D PlugIn [11 Oct 12]

Changelog
v2: Improved mpo decoding
v1: Initial version

Thanks
jmztaylor, who created the first app to enable the 3D display, which can be found in the Play Store.
Chillisaus for the help on the mpo decoding.
Attached Files
File Type: jar Tools3D_v2.jar - [Click for QR Code] (7.8 KB, 197 views)
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93
The Following 18 Users Say Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
HJ200
Old
(Last edited by HJ200; 30th September 2012 at 01:08 PM.)
#2  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Prompt API: Scale, crop and interlace bitmap

Code:
/**
 * Create a Tools3D object with default dimension
 * @param orientation Bitmap output in either LANDSCAPE or PORTRAIT
 */
public Tools3D(Orientation orientation);
Code:
/**
 * Create a Tools3D object with a given output dimension
 * @param outputDimension Bitmap output width x height
 */
 public Tools3D(Dimension outputDimension);
Code:
/**
 * Interlace a bitmap
 * @param pathName Location of the image to interlace (.mpo, .jps and side-by-side images supported)
 * @return Interlaced bitmap for the given screen dimension or default HTC EVO 3D screen size
 * @throws ParserException
 */
public Bitmap interlace(String pathName) throws ParserException, OutOfMemoryError;
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93
The Following 6 Users Say Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
HJ200
Old
(Last edited by HJ200; 30th September 2012 at 01:08 PM.)
#3  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Prompt API: Force 3D mode

Code:
/**
 * Force 3D mode <b>WARNING! USER NEEDS TO HAVE SU INSTALLED</b>
 * @param mode3D OFF, LANDSCAPE or PORTRAIT
 */
public static void set3DMode(Mode3D mode3D) throws IOException;
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93
The Following 6 Users Say Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
HJ200
Old
#4  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Update; improved mpo decoding
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93
The Following 2 Users Say Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
Chillisaus
Old
#5  
Junior Member
Thanks Meter 3
Posts: 2
Join Date: Nov 2009
Default Github

For anyone interested in the code:
github.com/mtoonen/mpo2jps
You can fork us, and if you have improvements, make a pull request.
The Following 3 Users Say Thank You to Chillisaus For This Useful Post: [ Click to Expand ]
 
bihariel
Old
#6  
bihariel's Avatar
Recognized Contributor
Thanks Meter 835
Posts: 678
Join Date: Apr 2010

 
DONATE TO ME
If any Android apps developer could create/modify a gallery app ( for example modifying an open source app) to use this tool to view 3D images, it would be awesome. I hope some one could do it.
If you like my work, consider to buy me a beer from button if you want.

 
HJ200
Old
#7  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Quote:
Originally Posted by bihariel View Post
If any Android apps developer could create/modify a gallery app ( for example modifying an open source app) to use this tool to view 3D images, it would be awesome. I hope some one could do it.
Did you see the 3rd url in the fipo?

Sent from my HTC EVO 3D X515m using xda premium
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93
The Following User Says Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
HJ200
Old
(Last edited by HJ200; 7th January 2013 at 01:47 PM.)
#8  
HJ200's Avatar
Senior Member - OP
Thanks Meter 264
Posts: 327
Join Date: Dec 2008
Hi folks,

As some of you might have read, I've found out how to enable the 3D screen without the need of root permissions. Here's a small library I made (it's not updated in the interlace library)

Note: this code only works on Sense 3.6 and Sense 4.0 roms, so you might want to implement the old method as a fallback (catch all Exceptions)

Code:
int LANDSCAPE = 0;
int PORTRAIT = 1;
int NORMAL = 2;

IDisplayService display = IDisplayService.Stub.asInterface(ServiceManager.getService("display"));
display.set3DMode(LANDSCAPE, "3dToggleTag");
Attached Files
File Type: jar framework-3d.jar - [Click for QR Code] (6.0 KB, 15 views)
My Devices:
Evo 3D Virtuous 3.0.4 | Flyer LeeDrOiD V2.1.0 | Desire Z Virtuous Unity 2.39.0 | Desire D-Sense 4.0 | HD2 1 Pdaimatejam Wp7.8 | HD2 2 ICS Beta 5b12
Touch Pro2 Stock | Touch HD TIADROID 2011.07.19 | Diamond Energy 29022

93

The Following 2 Users Say Thank You to HJ200 For This Useful Post: [ Click to Expand ]
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
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...