MAS and the shell?

[quote=122493:@Richard Summers]The problem I have is I need to resize the image 15 times - all different sizes.
So I would have to create 15 different canvas’s :)[/quote]

Richard – Your app apparently works fine with a shell to sips. Do not succomb to the never-finished-masterpiece syndrome and just release your app in the MAS. You will then have plenty of time to create version 2 with different technologies :wink:

Was going to do that, just researching my version 2 options :slight_smile:
I am just finishing my privacy policy page, as you advised.


[quote=122499:@Richard Summers]Was going to do that, just researching my version 2 options :slight_smile:
I am just finishing my privacy policy page, as you advised.[/quote]

Great. Once you have one picture, a description, your support link and privacy link, you can create your app :slight_smile:

For the resizing, you do not need a canvas but just to create a picture. I am sorry but I do not remember the details of your app. From what I remember you design icons, and will probably have to reduce a 1024x1024 picture to all the smaller sizes. It is fairly straightforward with DrawPicture.

We have all the CoreImage classes in the MBS Plugins for easy use.
Did you try that?

I’m looking into all the options :slight_smile:
Thank you all for the help.

[quote=122452:@Richard Summers]Thomas, where does the resizing actually take place in your example above?
It seems that it creates a new picture object exactly the same size as the original? Or am I missing something here?


To answer your question: This snippet resizes the backdrop of any size to the size of the canvas (ignoring the orientation) e.g. a picture with 2000x2000 will be resized to 32x32 if the canvas is 32pixels in width and height.

Thank you.

This is pseudo code, but you could add a method similar below to a shared module or anywhere really.

[code]function resizePicture( source as Picture, newWidth as integer, newHeight as integer) as picture
Dim rvalue as new picture( newWidth, newHeight) source, 0, 0, newWidth, newHeight, 0, 0, source.width, source.height

return rvalue
end function
Written in the web browser and un-tested, but it should be enough to set you on your way.

Thanks Sam - I will look into that :slight_smile:

Hey there Richard. You can definitely create images of different sizes entirely in memory, and then save them to disk if that’s your ultimate goal.

If you’re going to be working with image manipulation you may want to check out my old ImagePlay Effects Library, it’s got Resize and a bunch of other stuff. It probably needs to be updated for the modern Xojo framework though.