exportSnapshot quality?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
James Little
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 47
Joined: Thu Apr 27, 2006 11:19 pm

exportSnapshot quality?

Post by James Little » Wed Mar 26, 2014 1:09 am

Hey gang,

I've been working on a new version of SmoothieRx and the big thing for this new version is to up the quality of icons for Retina displays. One of the core features is to share a screenshot, but when I exportSnapshot it turns out super pixelated. I have tried multiple iterations on multiple platforms (Livecode 6.52 & 6.6), but it's still pixelated.

I think this is a feature request, but I just wanted to run it by you guys to see if there was anything I was missing.

Cheers,

Todd

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: exportSnapshot quality?

Post by Klaus » Wed Mar 26, 2014 1:00 pm

Hi Todd,

I have been using export snapshot in my last iPad app (NON retina) and do not see any problems?!
Could you post your "snapshot" script?


Best

Klaus

James Little
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 47
Joined: Thu Apr 27, 2006 11:19 pm

Re: exportSnapshot quality?

Post by James Little » Wed Mar 26, 2014 5:26 pm

Hi Klaus,

Code: Select all

 
on mouseDown
   put specialFolderPath("Documents") into tFolder
   export snapshot from this card to file (tFolder&"/recipegraph.png") as PNG
   if char 1 of the systemVersion >= 6 then
      mergPopActivity "#SmoothieRx",(tFolder&"/recipegraph.png"),"http://www.appstore.com/smoothierx"
   else
      if mergTweetCanSend() then
         mergTweet "#SmoothieRx","http://www.appstore.com/smoothierx",(tFolder&"/recipegraph.png")
      end if
   end if
end mouseDown
I double-checked this morning to see if mergPopActivity was compressing the image. It doesn't look like that's the case. The file on the iPhone's disk turns out to be 39 kbs. That's super small! It should be around 256 kbs at least.

James Little
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 47
Joined: Thu Apr 27, 2006 11:19 pm

Re: exportSnapshot quality?

Post by James Little » Mon Mar 31, 2014 10:44 pm

Just wanted to post a follow-up. My problem was with the new syntax: "at size" and then multiplying the width and height by the pixelScale.
There really should be better documentation for this with an example of where to put "at size."

Code: Select all

   export snapshot from this card at size (tWidth*tPixelScale, tHeight*tPixelScale) to file (tFolder&"/test.png") as PNG 
Hope this helps those who are similarly challenged.

Cheers,

Todd

Post Reply