Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19321] Glitch/Bug in Universal Unit Support in Ti SDK 4.0.1 and 4.1.0

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, iOS
Labelsn/a
ReporterCharlie Sands
AssigneeUnknown
Created2015-07-11T17:35:03.000+0000
Updated2018-02-28T19:55:40.000+0000

Description

I noticed a strange difference in behavior between Titanium SDK after version 3.5.1 when it comes to images that are created from a view and then saved to the device's file system. In the code example below, Ti SDK 3.5.1 produces an image file that is 240 dp x 320 dp, which is my desired outcome; in Ti SDK 4.0.0/4.1.0 however, the image that is created is 240 px x 320 px (i.e., 720 x 960 when created on iPhone 6 Plus): *Setting in tiapp.xml:* {quote}... dp ...{quote} *View in /app/views/index.xml:* {quote} {quote} *In /app/controllers/index.js:* {quote}var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'INPUT.jpg').read(); $.lgImageMaker.image = f; var b = $.lgImageContainer.toImage(); var m = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'OUTPUT.png'); m.write(b);{quote} I can replicate the behavior described above 100% of the time simply by switching between SDK 3.5.1 and either 4.0.1 or 4.1.0. Let me know if there is any other information I can provide that will help troubleshoot this. Thanks.

Comments

No comments

JSON Source