Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24141

iOS: TiBlob.imageAsResized resizing the Blob image but file size is very high (JPG)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.1.0
    • Component/s: iOS
    • Labels:
    • Environment:

      Ti SDK 3.0.2GA
      iOS 6.1

    • Story Points:
      5
    • Sprint:
      2016 Sprint 23 SDK

      Description

      'imageAsResized' however resizing the Blob image but resulting image size is very high.

      var image = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'images.jpeg').read();
          Ti.API.info("original image size:" + image.size);
          Ti.API.info("original image dimensions: " + image.width + 'x' + image.height);
          var newBlob1 = image.imageAsResized(160,120);
          Ti.API.info("test 1 image size:" + newBlob1.size);
          Ti.API.info("test 1 image dimensions: " + newBlob1.width + 'x' + newBlob1.height);
         
          var bgImage = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'test.jpeg');
       
          bgImage.write(newBlob1);
      

      Note: This issue is found with JPG images.However it is working fine in .png files.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hknoechel Hans Knöchel
                Reporter:
                mpathak Meenakshi Pathak
                Reviewer:
                Vijay Singh
                Tester:
                Samir Mohammed
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-10277
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code