From 00cd015df34bd319a774ab7b870004fcc82ff4a3 Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Mon, 8 Dec 2025 21:36:13 +0900 Subject: [PATCH] feat: Rename --- README.md | 8 ++-- example/README.md | 4 +- example/android/app/build.gradle.kts | 4 +- .../android/app/src/main/AndroidManifest.xml | 2 +- .../MainActivity.kt | 2 +- example/ios/Flutter/Debug.xcconfig | 1 + example/ios/Flutter/Release.xcconfig | 1 + example/ios/Podfile | 43 +++++++++++++++++++ example/ios/Runner.xcodeproj/project.pbxproj | 12 +++--- example/ios/Runner/Info.plist | 4 +- example/lib/main.dart | 4 +- example/pubspec.lock | 14 +++--- example/pubspec.yaml | 8 ++-- example/web/index.html | 4 +- example/web/manifest.json | 4 +- ...ffi.dart => platform_image_converter.dart} | 10 ++--- lib/src/android/native.dart | 6 +-- lib/src/android/stub.dart | 4 +- lib/src/darwin/native.dart | 6 +-- lib/src/darwin/stub.dart | 4 +- lib/src/web/stub.dart | 4 +- lib/src/web/web.dart | 4 +- pubspec.yaml | 4 +- 23 files changed, 100 insertions(+), 57 deletions(-) rename example/android/app/src/main/kotlin/com/example/{image_ffi_example => platform_image_converter_example}/MainActivity.kt (63%) create mode 100644 example/ios/Podfile rename lib/{image_ffi.dart => platform_image_converter.dart} (91%) diff --git a/README.md b/README.md index 4c9642f..b2413a8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# image_ffi +# platform_image_converter A high-performance Flutter plugin for cross-platform image format conversion using native APIs. @@ -26,17 +26,17 @@ A high-performance Flutter plugin for cross-platform image format conversion usi ### Installation -Add `image_ffi` to your `pubspec.yaml`: +Add `platform_image_converter` to your `pubspec.yaml`: ```yaml dependencies: - image_ffi: ^0.0.1 + platform_image_converter: ^0.0.1 ``` ### Basic Usage ```dart -import 'package:image_ffi/image_ffi.dart'; +import 'package:platform_image_converter/platform_image_converter.dart'; import 'dart:typed_data'; // Convert HEIC image to JPEG diff --git a/example/README.md b/example/README.md index 6f1f783..1d444bb 100644 --- a/example/README.md +++ b/example/README.md @@ -1,6 +1,6 @@ -# image_ffi_example +# platform_image_converter_example -Demonstrates how to use the image_ffi plugin. +Demonstrates how to use the platform_image_converter plugin. ## Getting Started diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts index 1fae4b6..eb309bd 100644 --- a/example/android/app/build.gradle.kts +++ b/example/android/app/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } android { - namespace = "com.example.image_ffi_example" + namespace = "com.example.platform_image_converter_example" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion @@ -21,7 +21,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.image_ffi_example" + applicationId = "com.example.platform_image_converter_example" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index c501d89..515d831 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index c970a3b..a13cc66 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -378,7 +378,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -394,7 +394,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -411,7 +411,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -426,7 +426,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -557,7 +557,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -579,7 +579,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.imageFfiExample; + PRODUCT_BUNDLE_IDENTIFIER = com.example.platformImageConverterExample; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 6a44b50..d20410e 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Image Ffi Example + Platform Image Converter Example CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - image_ffi_example + platform_image_converter_example CFBundlePackageType APPL CFBundleShortVersionString diff --git a/example/lib/main.dart b/example/lib/main.dart index b4eaea5..0d65f07 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,8 +1,8 @@ import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:image_ffi/image_ffi.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:platform_image_converter/platform_image_converter.dart'; void main() { runApp(const MainApp()); @@ -78,7 +78,7 @@ class _MainPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('image_ffi Demo')), + appBar: AppBar(title: const Text('platform_image_converter Demo')), body: SingleChildScrollView( padding: const .all(16), child: Column( diff --git a/example/pubspec.lock b/example/pubspec.lock index 575b636..52d83af 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -192,13 +192,6 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.2" - image_ffi: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.0.1" image_picker: dependency: "direct main" description: @@ -375,6 +368,13 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + platform_image_converter: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "0.0.1" plugin_platform_interface: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index b8e73da..81a4c1c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,5 +1,5 @@ -name: image_ffi_example -description: "Demonstrates how to use the image_ffi plugin." +name: platform_image_converter_example +description: "Demonstrates how to use the platform_image_converter plugin." publish_to: 'none' version: 1.0.0+1 @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - image_ffi: + platform_image_converter: path: ../ image_picker: @@ -22,5 +22,3 @@ dev_dependencies: flutter: uses-material-design: true - config: - enable-swift-package-manager: true diff --git a/example/web/index.html b/example/web/index.html index 5c1cba0..9bba061 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -23,13 +23,13 @@ - + - image_ffi_example + platform_image_converter_example diff --git a/example/web/manifest.json b/example/web/manifest.json index 170d958..31c3419 100644 --- a/example/web/manifest.json +++ b/example/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "image_ffi_example", - "short_name": "image_ffi_example", + "name": "platform_image_converter_example", + "short_name": "platform_image_converter_example", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/lib/image_ffi.dart b/lib/platform_image_converter.dart similarity index 91% rename from lib/image_ffi.dart rename to lib/platform_image_converter.dart index f83f689..85a62db 100644 --- a/lib/image_ffi.dart +++ b/lib/platform_image_converter.dart @@ -3,11 +3,11 @@ library; import 'dart:async'; import 'package:flutter/foundation.dart'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; -import 'package:image_ffi/src/android/shared.dart'; -import 'package:image_ffi/src/darwin/shared.dart'; -import 'package:image_ffi/src/web/shared.dart'; +import 'package:platform_image_converter/src/android/shared.dart'; +import 'package:platform_image_converter/src/darwin/shared.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; +import 'package:platform_image_converter/src/web/shared.dart'; export 'src/output_format.dart'; diff --git a/lib/src/android/native.dart b/lib/src/android/native.dart index 754f8d9..a0712b3 100644 --- a/lib/src/android/native.dart +++ b/lib/src/android/native.dart @@ -1,9 +1,9 @@ import 'dart:typed_data'; -import 'package:image_ffi/gen/jnigen_bindings.dart'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; import 'package:jni/jni.dart'; +import 'package:platform_image_converter/gen/jnigen_bindings.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; /// Android image converter using BitmapFactory and Bitmap compression. /// diff --git a/lib/src/android/stub.dart b/lib/src/android/stub.dart index 51247cd..454d5e4 100644 --- a/lib/src/android/stub.dart +++ b/lib/src/android/stub.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; final class ImageConverterAndroid implements ImageConverterPlatform { const ImageConverterAndroid(); diff --git a/lib/src/darwin/native.dart b/lib/src/darwin/native.dart index 2d51780..7cc762b 100644 --- a/lib/src/darwin/native.dart +++ b/lib/src/darwin/native.dart @@ -2,10 +2,10 @@ import 'dart:ffi'; import 'dart:typed_data'; import 'package:ffi/ffi.dart'; -import 'package:image_ffi/gen/darwin_bindings.dart'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; import 'package:objective_c/objective_c.dart'; +import 'package:platform_image_converter/gen/darwin_bindings.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; /// iOS/macOS image converter using ImageIO framework. /// diff --git a/lib/src/darwin/stub.dart b/lib/src/darwin/stub.dart index 59a1f39..c8e8082 100644 --- a/lib/src/darwin/stub.dart +++ b/lib/src/darwin/stub.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; final class ImageConverterDarwin implements ImageConverterPlatform { const ImageConverterDarwin(); diff --git a/lib/src/web/stub.dart b/lib/src/web/stub.dart index 8241075..775b462 100644 --- a/lib/src/web/stub.dart +++ b/lib/src/web/stub.dart @@ -1,7 +1,7 @@ import 'dart:typed_data'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; final class ImageConverterWeb implements ImageConverterPlatform { const ImageConverterWeb(); diff --git a/lib/src/web/web.dart b/lib/src/web/web.dart index e1507b6..e50a983 100644 --- a/lib/src/web/web.dart +++ b/lib/src/web/web.dart @@ -2,8 +2,8 @@ import 'dart:async'; import 'dart:js_interop'; import 'dart:typed_data'; -import 'package:image_ffi/src/image_converter_platform_interface.dart'; -import 'package:image_ffi/src/output_format.dart'; +import 'package:platform_image_converter/src/image_converter_platform_interface.dart'; +import 'package:platform_image_converter/src/output_format.dart'; import 'package:web/web.dart'; /// Web image converter using Canvas API. diff --git a/pubspec.yaml b/pubspec.yaml index 5971432..1677bf3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ -name: image_ffi +name: platform_image_converter description: "A high-performance Flutter plugin for cross-platform image format conversion using native APIs." version: 0.0.1 -homepage: https://github.com/koji-1009/image_ffi +homepage: https://github.com/koji-1009/platform_image_converter environment: sdk: ^3.10.0