MAS and the shell?

Does anyone know it the MAS has any objections to using sips via the shell?
My app uses the shell to call various sips commands, and was wondering if this was allowed in MAS apps.

Thank you all in advance.

There are some possible cases where it could be rejected

 2.5 Apps that use non-public APIs will be rejected

Since SIPS is command line access to Core Image you could get rejected for not using Core Image directly

But the only way to know for sure is to submit & see

Thanks Norman.
Any pointers to info regarding resizing images using Core Image?

Any links appreciated :slight_smile:

[quote=122243:@Richard Summers]Thanks Norman.
Any pointers to info regarding resizing images using Core Image?

Any links appreciated :)[/quote]

Sam Rowlands is probably the right guy to ask

Thanks.
Hello…Sam…are you there?
:slight_smile:

[quote=122249:@Richard Summers]Thanks.
Hello…Sam…are you there?
:)[/quote]

Core Image declares will probably be a whole lot more involved than a shell to sips. But indeed, Sam Rowlands is the most knowledgeable here, I think. Why not write him a private message ?

My application, Pneumatic Image Converter, uses sips. I’ve had various versions of it in the MAS since 2011.

I use tons of CL tools. Apple has never rejected one of my apps because I used a built-in UNIX CL tool.

I use shell a lot too and never had any issue. But never sips. So it is good to know you do.

Thanks guys - I will submit it and see what happens???

That’s the spirit :slight_smile:

You’l be alright.

I’m awake now. CoreImage is Awesome!

Any relevant links to resizing images via it? :slight_smile:

Ha… CoreImage is like a very smart, but unruly child! It’s really makes life easier with image processing, but it’s been a hell of a journey to get to where I am today (6 years of dealing with it and I still surprise myself).

As for links to a resizing tutorial… I don’t have any, unfortunately today I’m pushed for time so I can’t write you a quick tutorial either.

The MBS has most of the Core Image classes (enough for you to get started anyway), I’ll give you the steps.

#1 You need to load your image as a CIImage.
#2 You then create a NSAffineTransform and set the scaling factor.
#3 You then create a CIAffineTransform filter and set your CIImage as the input.
#4 You then need to render the transform, without looking at code, I seem to recall it comes out as a NSImage or CGImage. Either way you probably want to draw these into a resulting graphics port…

Heck if you’re resizing images, is there a reason why you’re not using the Xojo graphics functions?

I never knew I could?

Ah, well in that case…

#1 Load up your picture,
#2 create a new picture at the desired size.
#3 Draw your large picture down into the smaller picture.
#4 Save the smaller picture.

to resize a backdrop pic of a canvas, put this into a .paint event:

  #pragma unused areas
  
  if me.Backdrop <> nil then
    
    dim pic as new Picture(me.Width,me.Height,32)
    Pic.Graphics.DrawPicture Me.Backdrop,0,0, Pic.Width, Pic.Height, 0,0, Me.Backdrop.Width, Me.Backdrop.Height
    g.DrawPicture pic,0,0
  end if
  

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?

Thanks.

The code draws the picture in the size of the canvas. Check out the additional parameters of DrawPicture at http://documentation.xojo.com/index.php/Graphics.DrawPicture .

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 :slight_smile: