Java Code Examples for com.panoramagl.utils.PLUtils#getBitmap()

The following examples show how to use com.panoramagl.utils.PLUtils#getBitmap() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: PanoramaGL   File: PLJSONLoader.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void didEndDownload(String url, byte[] data, long elapsedTime)
{
	PLIImage image = new PLImage(PLUtils.getBitmap(data, mColorFormat), false);
	if(mPanorama instanceof PLCubicPanorama)
		((PLCubicPanorama)mPanorama).setImage(image, mIndex);
	else if(mPanorama instanceof PLIQuadricPanorama)
		((PLIQuadricPanorama)mPanorama).setImage(image);
}
 
Example 2
Source Project: SimplePanorama   File: MainActivity.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    bitmaps[0] = PLUtils.getBitmap(this, R.raw.sunset_at_pier);
    bitmaps[1] = PLUtils.getBitmap(this, R.raw.sunset_at_pier_grey);

    sphericalView = (SphericalView) findViewById(R.id.spherical_view);
    sphericalView.setPanorama(bitmaps[0], true);

    findViewById(R.id.button1).setOnClickListener(buttonClickListener);
    findViewById(R.id.button2).setOnClickListener(buttonClickListener);
}
 
Example 3
Source Project: panoramagl   File: PLJSONLoader.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void didEndDownload(String url, byte[] data, long elapsedTime) {
    PLIImage image = new PLImage(PLUtils.getBitmap(data, mColorFormat), false);
    if (mPanorama instanceof PLCubicPanorama)
        ((PLCubicPanorama) mPanorama).setImage(image, mIndex);
    else if (mPanorama instanceof PLIQuadricPanorama)
        ((PLIQuadricPanorama) mPanorama).setImage(image);
}
 
Example 4
Source Project: PanoramaGL   File: PLJSONLoader.java    License: Apache License 2.0 4 votes vote down vote up
protected PLIImage getLocalImage(String url, PLTextureColorFormat colorFormat)
{
	Bitmap bitmap = PLUtils.getBitmap(mView.getActivity().getApplicationContext(), url, colorFormat);
	return (bitmap != null ? new PLImage(bitmap, false) : null);
}
 
Example 5
Source Project: panoramagl   File: PLJSONLoader.java    License: Apache License 2.0 4 votes vote down vote up
protected PLIImage getLocalImage(String url, PLTextureColorFormat colorFormat) {
    Bitmap bitmap = PLUtils.getBitmap(mView.getContext().getApplicationContext(), url, colorFormat);
    return (bitmap != null ? new PLImage(bitmap, false) : null);
}