tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Loading AVIF Image

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-03-04 10:30:23
This document describes how to load online and local AVIF images.

Installing AVIF SDK

implementation 'com.qcloud.cos:avif:1.0.0'
The .so libraries will be included automatically. We recommend you use the "abiFilter" configuration of the NDK in the module's build.gradle file to set the .so library frameworks that are supported.
defaultConfig {
ndk {
// Set the .so library frameworks that are supported
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
}
}

Option 1. Loading online AVIF image

1. Integrate the CI SDK.
implementation 'com.qcloud.cos:cloud-infinite:1.2.1'
2. Build a link requesting AVIF images in the CI SDK, and then use it with Glide to load online AVIF images as instructed in Loading Image with Glide.
// Instantiate `CloudInfinite` to build an image request link;
CloudInfinite cloudInfinite = new CloudInfinite();
// Perform transformation according to the basic feature options of CI you select;
CITransformation transform = new CITransformation();
transform.format(CIImageFormat.AVIF, CIImageLoadOptions.LoadTypeUrlFooter);
// Build the image `CIImageLoadRequest`
CIImageLoadRequest request = cloudInfinite.requestWithBaseUrlSync(url, transform);

Option 2. Loading local AVIF image

You can use the AVIF format for the application's built-in resources, such as assets, drawable, and raw can reduce the size of the installation package.
// Load AVIF images in `Assets`
AVIFImageLoader.displayWithAssets(imageview, assetsName);
// Load AVIF images in `Resource`
AVIFImageLoader.displayWithResource(imageview, R.drawable.avif);
// Load AVIF images in local files
AVIFImageLoader.displayWithFileUri(imageview, fileUri);

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan