• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

1stplugins

FileMaker plug-ins and Reverse Engineering

  • Plugins
    • MediaManager
  • Services
    • Reverse Engineering
    • FileMaker Plug-Ins
  • About
    • About Us
    • Contact Us
    • Terms of Use of the Website and Privacy Policy
  • Store
    • Terms and Conditions
    • Warranty Claim Guidelines
    • Contract Withdrawal Form
    • Warranty Claim Report

Media_TCrop

Media_TCrop ( left ; top ; bottom ; right )

Media_TCrop crops images the next time you call Media_TApply. Cropping is applied to the source image before other transformations (like TRotate, TSkew, TScale).

Parameter Description
left horizontal coordinate of the top-left point of the cropping rectangle.
top vertical coordinate of the top-left point of the cropping rectangle.
right horizontal coordinate of the bottom-right point of the cropping rectangle.
bottom vertical coordinate of the bottom-right point of the cropping rectangle.

The crop parameter values are rounded to the nearest pixel.

Increasing Image Size

In addition to the ability to crop an image to a smaller canvas size, Media_TCrop can also be used to increase the image canvas size. To do this, all you need to do is set the TCrop parameters outside the original image’s dimensions. For example, if you have an image that is 100 x 100 and you want to add 20 pixels of unused space all around the image, use Media_TCrop ( -20 ; -20 ; 120 ; 120 ).

Crop Enacted First

If you call Media_TCrop along with other transformation functions and then activate them all with the same call to Media_TApply, Media_TCrop is always applied first. This is important to be aware of since it can affect the results of other transformation functions.

Activated by Media_TApply.

Returns

Empty string.

Examples

To crop an image down to 100 x 100 pixels that starts at an upper left point of 45, 35:

Set Field [ MyTable::Response; Media_TClear ]
Set Field [ MyTable::Response;
Media_TCrop ( 45; 35; 135; 145 ) ]

Set Field [ MyTable::Response; Media_TRotate ( 90 ) ]
Set Field [ MyTable::Picture Result;
Media_TApply ( MyTable::Picture 1 ) ]

To crop an image based on the values in four fields named “Crop Left”, “Crop Top”, “Crop Bottom”, and “Crop Right”:

Set Field [ MyTable::Response; Media_TClear ]
Set Field [ MyTable::Response;
Media_TCrop ( MyTable::Crop Left ;
MyTable::Crop Top ;
MyTable::Crop Bottom ;
MyTable::Crop Right ) ]

Set Field [ MyTable::Picture Result;
Media_TApply ( MyTable::Picture 1 ) ]

To increase the image canvas size by adding 150 pixels around a 350 x 450 pixel image:
Set Field [ MyTable::Response; Media_TClear ]
Set Field [ MyTable::Response;
Media_TCrop ( -150 ;
-150 ;
600 ;
500 ) ]

Set Field [ MyTable::Picture Result;
Media_TApply ( MyTable::Picture 1 ) ]

Primary Sidebar

Document Functions

Media_CopyItem
Media_CreateAlias
Media_CreateFolder
Media_DeleteItem
Media_ExportField
Media_ExtractInfo
Media_GetDefaultFolder
Media_GetItemInfo
Media_GetName
Media_GetPath
Media_InsertFile
Media_ListDisks
Media_ListFolder
Media_MoveItem
Media_OpenItem
Media_RenameItem
Media_SetDefaultFolder

General and Registration Functions

Media_Get
Media_GetLastError
Media_GetMouseUp
Media_JSONPath
Media_Register
Media_RegisterLicensedEncoder
Media_Set
Media_Version

Image Functions

Media_TApply
Media_TClear
Media_TCrop
Media_TQuad
Media_TResize
Media_TRotate
Media_TScale
Media_TSkew
Media_EffectApply
Media_EffectDialog
Media_ConvertImage
Media_GetImageInfo
Media_GetMetadata
Media_InsertImage
Media_ListImageOutputTypes
Media_SetImageDefaults

Script Steps

Copy Item
Create Alias
Create Folder
Delete Item
Export Field
Get Default Folder
Get Item Property
Move Item
Open Item
Rename Item
Set Default Folder

Sound Functions

Media_Amplify
Media_AppendSound
Media_ConvertSound
Media_CreateSound
Media_DrawWaveform
Media_ExtractSound
Media_FadeSound
Media_GetMetadata
Media_GetSoundInfo
Media_InsertQuickTime
Media_ListSoundOutputFormats
Media_MixSounds
Media_Normalize
Media_PlayPause
Media_PlaySound
Media_RecordSoundFormatDialog
Media_RecordSoundStart
Media_RecordSoundPause
Media_RecordSoundStop
Media_SetMetadata
Media_SoundFormatDialog
Media_StopSound

Video Functions

Media_GetVideoInfo

Footer

Let’s get started on your project.

Get in touch

  • Plugins
  • Services
  • About
  • Store

Copyright ©2006-2020 by 1stplugins, s.r.o. All rights reserved.