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 TPG Image

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-03-04 10:30:23
This document provides two ways to load TPG images: loading online and using the TPG module.

Option 1. Loading online TPG image

1. Integrate CloudInfinite.
pod 'CloudInfinite'
2. Build a link requesting TPG images in the CloudInfinite module, and then use it with SDWebImage to load online TPG images. Objective-C
// Instantiate `CloudInfinite` to build an image request link;
CloudInfinite * cloudInfinite = [CloudInfinite new];

// Build `CIImageLoadRequest` according to the basic feature options of CI you select;
CITransformation * transform = [CITransformation new];
[transform setFormatWith:CIImageTypeTPG options:CILoadTypeUrlFooter];

// Build the image `CIImageLoadRequest`
[cloudInfinite requestWithBaseUrl:@"image link" transform:transform request:^(CIImageLoadRequest * _Nonnull request) {
// Request the successfully built `CIImageLoadRequest` instance.
}];
swift
// Instantiate `CloudInfinite` to build an image request link;
let cloudInfinite = CloudInfinite();

// Build `CIImageLoadRequest` according to the basic feature options of CI you select;
let transform = CITransformation();
transform.setFormatWith(CIImageFormat.typeTPG, options: CILoadTypeEnum.urlFooter);

// Build the image `CIImageLoadRequest`
cloudInfinite.request(withBaseUrl: "image link", transform: transform) { (request) in
// Request the successfully built `CIImageLoadRequest` instance.
}

Option 2. Using TPG module to load TPG image

You can use the TPG module to load TPG image data, which supports TPG animated images with no additional processing needed.
1. Integrate the TPG module.
pod 'CloudInfinite/TPG'
2. If the TPG image data has been obtained, directly use the UIImageView+TPG class of the TPG module to decode and display the image.
Objective-C
[self.tpgImageView setTpgImageWithData:data loadComplete:^(NSData * _Nullable data, UIImage * _Nullable image, NSError * _Nullable error) {
}];
swift
imageView.setTpgImageWith(data) { (data, image, error) in
}


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan