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

iOS: event.media.size reporting incorrect file size after camera/picker

    Details

      Description

      While building an app which uses the camera or picker to choose or take photos, I've come across a bizarre bug.

      After choosing a photo from the album, I needed to know the file size. Also I needed to know the width and height. So, using:

      Ti.API.info("photo size : width:"+event.media.width+'   height:'+event.media.height);
      

      I can see the dimensions fine.

      But when I tried to use event.media.size it returned the width*height !!?? (See line 74 in TiBlob.m !) Most bizarre.

      When I then decide to write this file to the application data directory (as my app needs), this works fine as the blob's .size property does then respond with the correct filesize in bytes.

      Is this being caused by some confusion form using the word 'size' for a filesize in one case (a blob) and then by using the word 'size' for a dictionary containing width and height for an image.

      Either way, responding with width*height for an image 'size' seems like a nasty (but easily solved) error/bug.

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              kosso kosso
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code