@xuda.io/ai_module 1.1.4769 → 1.1.4770

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/old.mjs +18 -4
  2. package/package.json +1 -1
package/old.mjs CHANGED
@@ -2087,8 +2087,6 @@ for await (let account_profile of profile_requests_from_res.docs) {
2087
2087
  // }
2088
2088
  // };
2089
2089
 
2090
-
2091
-
2092
2090
  // export const get_business_info = async function (uid, name, email, account_profile_info) {
2093
2091
  // // ========== HELPER FUNCTIONS ==========
2094
2092
 
@@ -4635,8 +4633,6 @@ for await (let account_profile of profile_requests_from_res.docs) {
4635
4633
  // }
4636
4634
  // };
4637
4635
 
4638
-
4639
-
4640
4636
  // export const get_business_info = async function (uid, name, email, account_profile_info) {
4641
4637
  // // Extract lists from your JSON categories array
4642
4638
  // const categories = [
@@ -4774,3 +4770,21 @@ for await (let account_profile of profile_requests_from_res.docs) {
4774
4770
  // console.error('Error in get_business_info:', error);
4775
4771
  // }
4776
4772
  // };
4773
+
4774
+ // async function normalizeBase64To1024(base64Image) {
4775
+ // const inputBuffer = Buffer.from(base64Image, 'base64');
4776
+
4777
+ // const normalizedBuffer = await sharp(inputBuffer)
4778
+ // .resize(1024, 1024, {
4779
+ // fit: 'contain', // Preserve aspect ratio, fit within 211x211
4780
+ // background: { r: 0, g: 0, b: 0, alpha: 0 }, // Transparent background for padding
4781
+ // })
4782
+ // .png({
4783
+ // quality: 100,
4784
+ // compressionLevel: 9,
4785
+ // force: true,
4786
+ // })
4787
+ // .toBuffer();
4788
+
4789
+ // return normalizedBuffer.toString('base64'); // Return normalized base64 string
4790
+ // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.4769",
3
+ "version": "1.1.4770",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",