Revision: 2974
http://sourceforge.net/p/swingme/code/2974
Author: yuranet
Date: 2025-12-13 14:43:25 +0000 (Sat, 13 Dec 2025)
Log Message:
-----------
hide unpremultiply
Modified Paths:
--------------
iOSME/src/javax/microedition/lcdui/Image.java
Modified: iOSME/src/javax/microedition/lcdui/Image.java
===================================================================
--- iOSME/src/javax/microedition/lcdui/Image.java 2025-12-13 14:40:04 UTC (rev 2973)
+++ iOSME/src/javax/microedition/lcdui/Image.java 2025-12-13 14:43:25 UTC (rev 2974)
@@ -496,7 +496,7 @@
if (alphaMode == CGImageAlphaInfo.PremultipliedFirst || alphaMode == CGImageAlphaInfo.PremultipliedLast) {
for (int a = 0; a < height; a++) {
for (int b = 0; b < width; b++) {
- rgb[offset + a * distScanLength + b] = unpremultiply(rgb[offset + a * distScanLength + b]);
+ rgb[offset + a * distScanLength + b] = unpremultiplyAlpha(rgb[offset + a * distScanLength + b]);
}
}
}
@@ -554,7 +554,7 @@
* TODO maybe we can use a system apple function to do this
* @see apple.accelerate.c.Accelerate#vImageUnpremultiplyData_ARGB8888(apple.accelerate.struct.vImage_Buffer, apple.accelerate.struct.vImage_Buffer, int)
*/
- public static int unpremultiply(int argb) {
+ private static int unpremultiplyAlpha(int argb) {
int a = argb >>> 24; // alpha 0..255
if (a == 0 || a == 255) return argb; // fully transparent or opaque, no change needed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|