Home Image-Pro Automation (Macros, Apps, Reports)

JPG IMAGE QUALITY . . .

2020-11-17-152010

All --

I am writing a writing an APP that saves large images in JPG IMAGE FILES.  I would like save the JPG IMAGE FILES using a QUALITY of 50.  Here is the equivalent from the USER INTERFACE.



How do I do this with CODE?

Thanks.

-- Matt

Answers

  • 2020-11-18-161038

    All --

    I am about to open up the CODE and make some modifications.

    Is there a CODE DRIVEN way to save a JPG IMAGE with QUALITY = 50?

    I have dug through the HELP FILES but do not see anything helpful.

    Thanks.

    -- Matt
  • Hi Matt,

    Here is a macro that will do that for you, you will need a reference MediaCy.IQL.IO.dll.

        Public Sub SaveJpg
            Dim image1 As McImage
    
            With Application.DocumentCommands.ActiveImage(Nothing)
                .Run(image1)
            End With
    
            image1.File.Format="jpg"
            image1.File.Attributes("CompressionQuality") = 50
            image1.SaveAs(ThisApplication.Path(mcPathType.mcptWritableImages) & "test.jpg")
    
        End Sub
  • 2020-11-19-122412

    Pierre --

    Super.

    Thanks.

    -- Matt




Sign In or Register to comment.