kandi background
Explore Kits

BigImageViewer | Big image viewer supporting pan | Computer Vision library

 by   Piasy Java Version: Current License: MIT

 by   Piasy Java Version: Current License: MIT

Download this library from

kandi X-RAY | BigImageViewer Summary

BigImageViewer is a Java library typically used in Telecommunications, Media, Media, Entertainment, Artificial Intelligence, Computer Vision applications. BigImageViewer has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support!.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • BigImageViewer has a medium active ecosystem.
  • It has 3743 star(s) with 384 fork(s). There are 72 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 27 open issues and 160 have been closed. On average issues are closed in 53 days. There are 1 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of BigImageViewer is current.
BigImageViewer Support
Best in #Computer Vision
Average in #Computer Vision
BigImageViewer Support
Best in #Computer Vision
Average in #Computer Vision

quality kandi Quality

  • BigImageViewer has 0 bugs and 0 code smells.
BigImageViewer Quality
Best in #Computer Vision
Average in #Computer Vision
BigImageViewer Quality
Best in #Computer Vision
Average in #Computer Vision

securitySecurity

  • BigImageViewer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • BigImageViewer code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
BigImageViewer Security
Best in #Computer Vision
Average in #Computer Vision
BigImageViewer Security
Best in #Computer Vision
Average in #Computer Vision

license License

  • BigImageViewer is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
BigImageViewer License
Best in #Computer Vision
Average in #Computer Vision
BigImageViewer License
Best in #Computer Vision
Average in #Computer Vision

buildReuse

  • BigImageViewer releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
BigImageViewer Reuse
Best in #Computer Vision
Average in #Computer Vision
BigImageViewer Reuse
Best in #Computer Vision
Average in #Computer Vision
Top functions reviewed by kandi - BETA

kandi has reviewed BigImageViewer and discovered the below as its top functions. This is intended to give you an instant insight into BigImageViewer implemented functionality, and help decide if they suit your requirements.

  • Show the image .
  • Call when the image is ready .
  • Configure the recycler .
  • Asynchronously loads an image .
  • Loads an image .
  • Shows an alert dialog .
  • region ResultStream Implementation
  • Get image type from file .
  • This method fixes LeakCanaryBoost .
  • Invokes a method on the server .

BigImageViewer Key Features

Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

Add the dependencies

copy iconCopydownload iconDownload
allprojects {
    repositories {
        mavenCentral()
    }
}

implementation 'com.github.piasy:BigImageViewer:1.8.0'

// load with fresco
implementation 'com.github.piasy:FrescoImageLoader:1.8.0'

// load with glide
implementation 'com.github.piasy:GlideImageLoader:1.8.0'

// progress pie indicator
implementation 'com.github.piasy:ProgressPieIndicator:1.8.0'

// support thumbnail, gif and webp with Fresco
implementation 'com.github.piasy:FrescoImageViewFactory:1.8.0'

// support thumbnail and gif with Glide
implementation 'com.github.piasy:GlideImageViewFactory:1.8.0'

Initialize

copy iconCopydownload iconDownload
// MUST use app context to avoid memory leak!
// load with fresco
BigImageViewer.initialize(FrescoImageLoader.with(appContext));

// or load with glide
BigImageViewer.initialize(GlideImageLoader.with(appContext));

// or load with glide custom component
BigImageViewer.initialize(GlideCustomImageLoader.with(appContext, CustomComponentModel.class));

Add the BigImageView to your layout

copy iconCopydownload iconDownload
<com.github.piasy.biv.view.BigImageView
        android:id="@+id/mBigImage"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:failureImage="@drawable/failure_image"
        app:failureImageInitScaleType="center"
        app:optimizeDisplay="true"
        />

Show the image

copy iconCopydownload iconDownload
BigImageView bigImageView = (BigImageView) findViewById(R.id.mBigImage);
bigImageView.showImage(Uri.parse(url));

Animated image support

copy iconCopydownload iconDownload
// FrescoImageViewFactory is a prebuilt factory, which use Fresco's SimpleDraweeView
// to display animated image, both gif and webp are supported.
biv.setImageViewFactory(new FrescoImageViewFactory());

// GlideImageViewFactory is another prebuilt factory, which use ImageView to display gif,
// animated webp is not supported (although it will be displayed with ImageView,
// but it won't animate).
biv.setImageViewFactory(new GlideImageViewFactory());

Thumbnail support

copy iconCopydownload iconDownload
bigImageView.showImage(Uri.parse(thumbnail), Uri.parse(url));

Download progress indicator

copy iconCopydownload iconDownload
bigImageView.setProgressIndicator(new ProgressPieIndicator());

Prefetch

copy iconCopydownload iconDownload
BigImageViewer.prefetch(uris);

Save image into gallery

copy iconCopydownload iconDownload
bigImageView.setImageSaveCallback(new ImageSaveCallback() {
    @Override
    public void onSuccess(String uri) {
        Toast.makeText(LongImageActivity.this,
                "Success",
                Toast.LENGTH_SHORT).show();
    }

    @Override
    public void onFail(Throwable t) {
        t.printStackTrace();
        Toast.makeText(LongImageActivity.this,
                "Fail",
                Toast.LENGTH_SHORT).show();
    }
});

// should be called on worker/IO thread
bigImageView.saveImageIntoGallery();

Get current image file

copy iconCopydownload iconDownload
// only valid when image file is downloaded.
File path = bigImageView.getCurrentImageFile();

Image init scale type

copy iconCopydownload iconDownload
mBigImageView.setInitScaleType(BigImageView.INIT_SCALE_TYPE_CENTER_CROP);

Image load callback

copy iconCopydownload iconDownload
ImageLoader.Callback myImageLoaderCallback = new ImageLoader.Callback() {
    @Override
    public void onCacheHit(int imageType, File image) {
      // Image was found in the cache
    }

    @Override
    public void onCacheMiss(int imageType, File image) {
      // Image was downloaded from the network
    }

    @Override
    public void onStart() {
      // Image download has started
    }

    @Override
    public void onProgress(int progress) {
      // Image download progress has changed
    }

    @Override
    public void onFinish() {
      // Image download has finished
    }

    @Override
    public void onSuccess(File image) {
      // Image was retrieved successfully (either from cache or network)
    }

    @Override
    public void onFail(Exception error) {
      // Image download failed
    }
}

Full customization

copy iconCopydownload iconDownload
public SubsamplingScaleImageView getSSIV() {
    return mImageView;
}

Custom Glide components support

copy iconCopydownload iconDownload
BigImageViewer.initialize(GlideCustomImageLoader.with(appContext, CustomComponentModel.class));

Caveats

copy iconCopydownload iconDownload

configurations {
  all {
    resolutionStrategy {
      eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'com.squareup.okhttp3' &&
            details.requested.name ==
            'okhttp') {
          // OkHttp drops support before 5.0 since 3.13.0
          details.useVersion '3.12.6'
        }
      }
    }
  }
}

Community Discussions

Trending Discussions on BigImageViewer
  • Android. Touch listener get mixed between two views
Trending Discussions on BigImageViewer

QUESTION

Android. Touch listener get mixed between two views

Asked 2019-Oct-16 at 11:53

I have a really weird issue. I have a complex linear layout containing 3 children.The first left child is a list (a lot like the list detail pattern of android(two pans)) the second child is a separator view (just a simple view as a line separator) and the third is a Big Image view (https://github.com/Piasy/BigImageViewer)

The problem is when trying to zoom on the right side the recycler view items get clicked

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="5">

<LinearLayout
    android:id="@+id/total_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    >
    <RelativeLayout
        android:id="@+id/menu_container"
        android:layout_width="180dp"
        android:layout_height="match_parent"

        >


        <include
            android:id="@+id/list"
            layout="@layout/list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"

            />

        <ProgressBar
            android:id="@+id/devices_new_progress_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:visibility="gone" />

    </RelativeLayout>


    <View
        android:id="@+id/line_seperator"
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:background="@color/grey"

        ></View>

    <RelativeLayout
        android:id="@+id/image_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >


        <com.github.piasy.biv.view.BigImageView
            android:id="@+id/layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            app:customSsivId="@+id/mSSIV"

            app:initScaleType="centerInside"

            app:optimizeDisplay="true">

            <ImageSSIV
                android:id="@+id/mSSIV"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </com.github.piasy.biv.view.BigImageView>

        <ProgressBar
            android:id="@+id/image_progress_bar"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_centerInParent="true"
            android:visibility="gone" />


    </RelativeLayout>



</LinearLayout>

ANSWER

Answered 2018-Jun-22 at 04:41

Check your match_parent attributes so they are not triggered by the screen touches

Source https://stackoverflow.com/questions/50979544

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install BigImageViewer

There is one built-in indicator, ProgressPieIndicator, you can implement your own indicator easily, learn by example.

Support

Since 1.5.0, BIV support display animated image, e.g. gif and animated webp, to achieve that, you need set a custom ImageViewFactory via biv.setImageViewFactory:. Node: if the image is not gif or animated webp, then it will be displayed by SSIV, the image type is not determined by its file extension, but by its file header magic code.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Compare Computer Vision Libraries with Highest Support
Compare Computer Vision Libraries with Highest Security
Compare Computer Vision Libraries with Permissive License
Compare Computer Vision Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.