Changeset 14358
- Timestamp:
- 01/13/2025 07:42:49 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/google-vision-api.php
r11679 r14358 141 141 $results = []; 142 142 143 $colors = self::extract_colors( $response->imageProperties()->info()['dominantColors']['colors'] ); 144 if ( $colors ) { 145 $results['vision_raw_colors'] = $colors[0]; 146 $results['vision_colors'] = $colors[1]; 143 // Extract colors. 144 $image_properties = $response->imageProperties(); 145 if ( $image_properties ) { 146 $raw_colors = $image_properties->info()['dominantColors']['colors'] ?? []; 147 if ( $raw_colors ) { 148 $colors = self::extract_colors( $raw_colors ); 149 $results['vision_raw_colors'] = $colors[0]; 150 $results['vision_colors'] = $colors[1]; 151 } 147 152 } 148 153
Note: See TracChangeset
for help on using the changeset viewer.