Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): optimize imageAsResized #10380

Merged
merged 7 commits into from Apr 26, 2019
Merged

fix(android): optimize imageAsResized #10380

merged 7 commits into from Apr 26, 2019

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Oct 16, 2018

@build
Copy link
Contributor

build commented Oct 16, 2018

Fails
🚫 Tests have failed, see below for more information.
Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, m1ga! Thanks again for helping us make Titanium SDK better. 👍
📖 ❌ 1 tests have failed There are 1 tests failing and 447 skipped out of 2984 total tests.

Tests:

Classname Name Time Error
android.Titanium.Blob #imageAsResized() with PNG 0.002 expected 50 to equal 60

Generated by 🚫 dangerJS against 7706591

@build build added this to the 8.0.0 milestone Dec 20, 2018
@build build requested a review from a team December 20, 2018 18:49
@sgtcoolguy sgtcoolguy removed this from the 8.0.0 milestone Jan 9, 2019
Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS

@garymathews garymathews changed the title [AC-5977] Android: optimize imageAsResized fix(android): optimize imageAsResized Feb 5, 2019
@m1ga
Copy link
Contributor Author

m1ga commented Feb 28, 2019

The test is failing because the image will be 50x50 (since the source image is squared) and it is not stretching the result. So this method can only be used if the ratio is correct or it has to be stretched in the last step e.g. use imageResized = Bitmap.createBitmap(img, 0, 0, imgWidth, imgHeight, matrix, true); for non-squared images at the end. But I need to verify that

@build
Copy link
Contributor

build commented Apr 17, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, m1ga! Thanks again for helping us make Titanium SDK better. 👍
📖

✅ All tests are passing
Nice one! All 3797 tests are passing.
(There are 466 tests skipped)

Generated by 🚫 dangerJS against a25c949

@lokeshchdhry
Copy link
Contributor

FR Passed.

The PR does save some memory.

Studio Ver: 5.1.2.201903111843
SDK Ver: 8.1.0 local build
OS Ver: 10.14
Xcode Ver: Xcode 10.1
Appc NPM: 4.2.13
Appc CLI: 7.0.10
Daemon Ver: 1.1.3
Ti CLI Ver: 5.1.1
Alloy Ver: 1.13.9
Node Ver: 8.15.1
NPM Ver: 6.4.1
Java Ver: 10.0.2
Devices: ⇨ google Nexus 5 (Android 6.0.1)
⇨ google Pixel (Android 9)

@lokeshchdhry lokeshchdhry merged commit f3061dc into tidev:master Apr 26, 2019
@m1ga m1ga deleted the resize branch August 7, 2020 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants