Automated process to crop away certain pixels

How can I automate the process to crop away certain pixels from the edges of a batch of pictures of different dimension?
Example:
Picture 1 : 400 x 600px
Picture 2 : 360 x 480px
Picture 3 : 600 x 800px
I want to crop away 5px from each edge of each picture which would then end up being 390x590px, 350x470px and 590x790px respectively.

MichaelTeoh wrote:
I want to crop away 5px from each edge of each picture which would then end up being 390x590px, 350x470px and 590x790px respectively.
Example:
Picture 1 : 400 x 600px    = 400:600 = 4:6 =  2:3
Picture 2 : 360 x 480px    = 36:48 = 6:8 = 3:4
Picture 3 : 600 x 800px   =  3:4
So you can record the three action to center crop your images to the 2:3 and 3:4 aspect ratios  shown in your examples then use image size to size them you three example  pixel sizes then use canvas size to to trim the 5 px of the border,  just set the canvas to you three sizes 390x590px  350x470px and 590x790px do not check relative and leave the anchor point in the center.  Five pixels will be trimmed form all sides. Any image that started with the correct 2:3 or 3:4 aspect ratios will not be cropped by the first crop only the canvas size crop will trim pixels.
To handle both Portrait and Landscape image the action would need to record a fit image step instead of the image size step a fit image step fit to longest side need to be recorded  and the canvas size would need to be recorded to trim both width and height by a relative -10px.   My  AspectRatioSelection plugin will automatically orient the aspect ratio recorded to the images orientation.

Similar Messages

  • Batch process to crop odd-sized photos

    Am I hoping to do the impossible?
    I have photos sized 667 X 1000 I wish to crop to 200 X 400
    without distorting them. My idea is to import them into a blank
    canvas of 500 X 1000, save, then batch resize them to 200 X 400. Is
    there a way to batch process the importing / saving step? Obviously
    some of the initial photo will be cropped, but if I could set it to
    top align and center the width in the blank canvas 95% of my photos
    should be fine. I could then manually re-crop the photos that are
    cut-off strangely.
    Any suggestions? I have almost 1000 photos. TIA.

    MichaelTeoh wrote:
    I want to crop away 5px from each edge of each picture which would then end up being 390x590px, 350x470px and 590x790px respectively.
    Example:
    Picture 1 : 400 x 600px    = 400:600 = 4:6 =  2:3
    Picture 2 : 360 x 480px    = 36:48 = 6:8 = 3:4
    Picture 3 : 600 x 800px   =  3:4
    So you can record the three action to center crop your images to the 2:3 and 3:4 aspect ratios  shown in your examples then use image size to size them you three example  pixel sizes then use canvas size to to trim the 5 px of the border,  just set the canvas to you three sizes 390x590px  350x470px and 590x790px do not check relative and leave the anchor point in the center.  Five pixels will be trimmed form all sides. Any image that started with the correct 2:3 or 3:4 aspect ratios will not be cropped by the first crop only the canvas size crop will trim pixels.
    To handle both Portrait and Landscape image the action would need to record a fit image step instead of the image size step a fit image step fit to longest side need to be recorded  and the canvas size would need to be recorded to trim both width and height by a relative -10px.   My  AspectRatioSelection plugin will automatically orient the aspect ratio recorded to the images orientation.

  • Is it possible to run process chain from the certain process/point?

    Hello
    Is it possible to run process chain from the certain process?
    How?
    Thanks

    Hello,
    yes it possible! use the following steps.
    1. Goto the process which you want the chain to start from.Goto display messages>> Chain tab. In the generated instance note the variant and instance.
    2. Goto table RSPROCESSLOG and give variant and instance and get logid details.
    3. t codese37>> run FM RSPROCESSFINISH.
    4. give the deatils u have got in RSPROCESSLOG table here and say execute.
    This will solve ur problem.
    Hope this helps!
    Reg
    Deepmala

  • After creating a mask on a pixel layer and then throwing it away, the pixels disapper

    If I create a mask on a pixel layer and then throw the mask away, the pixels under the old black mask disappear. Help! How do I fix this? I have already reset preferences. I am using the most current version of Photoshop CC 2014 on a Mac with OS 10.9.5

    Or just leave the layer mask in place.  It's a valuable recourse that you might need to use again.  The layer mask exists as an alpha channel.  It's there in the Channels panel when you click on the layer that contains the layer mask.  You might want to restrict an adjustment layer to the same area, or the inverse of that area.  It's not always convenient to do that by clipping — you might be targeting a layer way up the stack.
    OK, you can Ctrl click the layer if you removed the mask by Applying it, but it feels just plain wrong to me to throw a hard won selection in the dustbin.

  • Automated Process to save Report  in Share drive?

    Does SAP has any functionality that enables client to setup some sort of autmated process to generate Report(Excel)  and save it to share drive?
    Forgive me ignorance.

    Hi Chetan:
    thanks alot for your response.
    I have couple more questions for you if you don't mind.
    The client I am working for looking for ways to send Report to Exec.
    1. They want to run the report and save it in excel sheet in share drive for Exec? They want it to be done by some sort of Automated process , Can you think of doing it anyway?
    2. Sending email by Bex Broadcaster. To send email, do they need to develop WAD?  How the Bex Broadcaster works? The Client does not have any WAD now.
    Can they still send Exec repors in email in html, pdf format?
    3. Enterprise Portal - How they can use it?
    Points awarded.
    Thanks a lot!

  • Want to know the PANTONE color of at a certain pixel of the image

    Dear Sir ,
    I am designing a software that will get the pantone color of certain location of the image . I will define a certain pixel location of the image , then I want the software to detect the equivalent pantone color .
    NB> the image is obtained from a scanner .
    thanks, Dr.WS Mak.

    Dear Dir ,
    Thank you so much for you interest , I really appreciate it so much .
    Regarding the Pantone color table ( conversion between Pantone and RGB system ) , I have that table in *.mdb (MicroSoft Access Database) that have each Pantone color and the corresponding RGB , CMY and HEX values .
    The problem is  : HOW to make such comparisons to get the corresponding Pantone . To make the situation easier to you , I have a certain color that is supposed to be a certain  Pantone C137 . I want to check if it is Pantone C137 or not  . I need this to be done by getting the CORRLEATION between two colors , ie the test color is 100 % of Pantone C137 , ie Iam 100% certain that the test color is the Pantone color . In the real world  , the test color may not be the same as Pantone C137 , if it is very close to the reference color , it the correlation will be 99.85 % , and so on . I will make my software make a tolerance for the test color , ie my tolerance is 2 % . ie , I will only accept colors that are 2 % different from the reference color . NB> I can get the reference color (eg in this case Pantone C137) by scanning this pantone and storing the color in the software .
    if you can supply me with a simple code that can compare 2 colors together and get the correlation between them , it will be so helpfull .
    Thanks.
    Best Regards,
    Dr.WS Mak.

  • Need help to write a query in automation process

    i want to run the scripts in automation process.Is anyone tel me wat is the solution for it?
    how to run this scripts in automated process?
    Edited by: 927851 on Apr 19, 2012 9:56 AM

    Hi
    If you are unix user...
    you can use script like below:
    # $2 is the output filename, $1 is the .sql script
    runsql()
        sqlplus -s user/passwd/@somewhere <<EOF  > $2
        start $1
        exit
    EOF
    runsql file1.sql logfile1 &
    runsql file2.sql  logfile2 &
    runsql anotherfile.sql logfile3  &
    wait

  • How come a font set at a certain pixel size is not actually that size when you measure it's height? For example, a font set at size 24 pixels is actually only 16 pixels tall (cap height).

    How come a font set at a certain pixel size is not actually that size when you measure it's height? For example, a font set at size 24 pixels is actually only 16 pixels tall (cap height).

    Hello, indeed, as Semaphoric stated, the Em box is not the same as the Cap heigh...
    It is described in length in this blog post by Thomas Phinney http://www.thomasphinney.com/2011/03/point-size/
    THis article has good images also that illustrate the em square: Font Bureau Blog | The Em

  • I was not given the option to purchase applecare + with iPhone 5.I tried calling Apple customer service, the automated process took my info but then came back and said too busy to help you now. How can I buy it now?

    I was not given the option to purchase applecare + with iPhone 5.I tried calling Apple customer service, the automated process took my info but then came back and said too busy to help you now. How can I buy it now?

    You should call Apple but you should get an email from Apple. I got one a few minutes ago and this is what they said about AppleCare+ :
    Thank you for your recent iPhone 5 purchase at the Apple Store.
    We would like to let you know that every iPhone comes with one year of hardware repair coverage through its limited warranty and up to 90 days of complimentary support. AppleCare+ for iPhone extends your coverage to two years from the original purchase date of your iPhone and adds up to two incidents of accidental damage coverage, each subject to a $49 service fee.
    We noticed you weren't given the opportunity to add AppleCare+ to your iPhone. If you would like to extend your coverage for only $99, please reply to this email by September 21st.
    After that date, if you would still like to purchase AppleCare+ within the first thirty days of receiving your iPhone, you can call AppleCare at 800-MY-IPHONE or visit an Apple Retail Store.
    Thank you for shopping with Apple.
    Sincerely,
    Apple Online Store Team

  • ECC to BW automated process??

    Hello Guru's,
    Can some one tell me step by step process to create an automated process by which Agreements posted in ECC tabels will be posted in to SAP BI on a daily basis.
    Thank You in Advance.

    Hi,
    For automation, you need to create Process chain in RSPC transaction.
    since your requirement is only loading the data from ECC system,
    you should know the source of data in ECC system. i.e DataSource .
    Once you found the DataSource  from where data is coming, identify whether it is a standard one or  customized one.
    in either case, you need to replicate the DataSource , associated extraction structure, and the FM if applicable to BW system.
    once this is done, create InfoPackage  in BW and assign the same InfoPackage  in the Process chain to Load the data.
    let me know if u need mroe help.
    --adlin

  • Configurable Automated Process

    Hey Everyone!
    I want to the best way to import a set of instructions to send to a micro controller. I would like to import a file (text, csv, etc) with a list of commands in sequential order.
    Often, before and after an instruction, I will need to call a sub vi to carry out a task to calculate variables for the instruction.
    Attached is an example of instructions I'd like to send. The grayed boxed are Sub-VIs.
    Also attached is some sample code I am playing with to import the instructions from a csv file
    Attachments:
    Flow.xls ‏42 KB
    Flow.xls ‏42 KB
    Automated Process.vi ‏41 KB

    A good approach is trough NI-VISA serial communication commands, take a look at the overview here. Just make sure that your micro controller supports serial communication (typically RS-232). There are several threads that talk about this and they can help you to develop your application like Serial Communication with micro controller. I hope this helps!
    Alejandro | Academic Program Engineer | National Instruments

  • Flat File automation process - limitations

    Hello Everyone,
    I would really appreciate any insight on the process improvement suggestions.
    Background:
    Currently we have around 12 territories providing a new flat file with new data on a daily basis depending on the business activity. Which would also mean that, on a given day if there is no activity would mean no flat file provided to BI for loading process.
    The flat files provided need to be loaded into the BI system (PSA - DSO - InfoCube).
    The flat file loading process has been automated for the daily file by implementing the logical file name for each territory.
    1. The process variant in the process chain is to ensure if the flat file is available on the App server (Custom ABAP program).
    2. 12 InfoPackages have been created to pick the data from the flat file on the app server and load the data over into the PSA.
    3. All the InfoPackages merge into an "AND" event in the process chain before the DTP load into the DSO kicks off.
    4. DSO Activation
    5. Recon between the flat file and the DSO to ensure all the data from flat file has been loaded into the DSO.
    6. DTP loads into the InfoCube.
    7. Recon between the InfoCube and the DSO itself.
    8. Moving the flat file from one folder into another.
    All the above processes are automatically performed without any issues if the flat file is available on the server.
    Problem / Issue:
    As one of the major limitations of the above design is the flat file for sure needs to be made available on the app server in order for the whole data flow in the process chain to continue without any breakpoints.
    Current workaround / process improvement in place:
    Based on the above limitation and upon further research, I was able to apply the OSS Note to give us the option of maintaining multiple DTPs for the same data target with different filter values.
    So, even if have individual data stream for each territory with a different DTP the issue still remains where the process variant (ABAP program to check if file exists) or the InfoPackage load if the ABAP program is removed will fail.
    Which means due to the above fact, the support team is alerted about the process chain failure.
    Question / Suggestions required:
    The main questions or any suggestions would be welcome, if one of you can let us know an approach where the flat file check program doesn't have to give a hard failure in the process chain for the rest of the process chain to continue with the loading process. (As in order for the rest of the process chain to continue the only options we have are Error, Success, Always).
    I have also looked into the Decision process variant available in the process chain, but based on the options available within I cannot utilize it for the loading process.
    Error can be caused by generating an error message in the ABAP program which in turn is causing the issue of alert being sent over even if the rest of the process chain finishes.
    Success would mean the flat file needs to be available. Always cannot be used in this case as it will cause a failure at the InfoPackage level.
    If the InfoPackage load can be avoided without a hard error to be generated, the process chain does not have to remain in the failed state which in turn will not trigger any alert to the support team.
    Please do let me know if you need more details about the above process improvement question.
    Thanks
    Dharma.

    The main issue with this as you mentioned is that the file has to be available for sure.
    We had a similar issue - we had a very critical data load that had to happen everyday , failure of the file getting loaded would mean that the reports for the day would be delayed.
    We were running on UNIX and we implemented a simple UNIX command that would not complete till the file was available in the app server.
    Something like
    while ( the file does not exist )
    delay of 15 seconds
    you will come out of the while only after the while completes which means that the file becomes available.
    You can write a similar ABAp program to check file availability if required and put it into your program.
    we also had a failover process where we created a zero byte file with the same name if the file did not come beyond a certain number of tries and the PSA would load zero records and the data load will continue.
    Edited by: Arun Varadarajan on Jan 26, 2009 10:18 AM

  • No Previews and Processing (using Crop)

    Sorry, best I could do with the title of this post.
    So I turned off the generate Previews feature. First, how can I tell there is no preview? Outside of looking for it in Finder? (just wondered)
    I was going to crop a photo, but for some reason I didn't think that would be a non-destructive task. So I duplicated the Version and cropped it.
    Then I tested my theory (or skepticism) and discovered cropping is non-destructive. You can click Crop on and off. (nice)
    But I did notice that everytime I clicked it on and off, I saw that some processing was necessary. The Activity window just displayed processing, no other info.
    So is this an example of how Previews would speed things up? If I had a Preview, Aperture wouldn't have to be manipulating the full size Master?

    Last bit first:
    So is this an example of how Previews would speed things up? If I had a Preview, Aperture wouldn't have to be manipulating the full size Master?
    As has been stated in the past when you are adjusting images in Aperture you are dealing with the master, the full resolution master. You do not adjust previews. Again you can test this out by turning on previews only and seeing that Aperture will not allow you to adjust the image.
    All adjustments in Aperture, ALL, are non-destructive. The master is never ever modified.
    What you are probably seeing is the lag as Aperture applies the adjustment to the master. Previews being on might help in this case, once the preview is generated with the new adjustment it will be displayed while the adjustment is applied to the master. But once the adjustment is applied to the master it is the master that your are seeing.
    Easy enough to see if this is the case here or if the lag is for some other reason, generate a preview for this one image and try your experiment again. See if the lag goes away.
    regards

  • How to configure CVC automation process using SNP master data and BI customer master data

    Hi Gurus,
    How to configure CVC automation in MPOS structure technically, using SNP master data in CVC creation such as Product and location details
    and in parallel extract date from ECC to BI customer master data in DP. Where-in a APO BI cube should have only new combinations which are to be validated with ECC and existing combinations in the MPOS structure before creation of CVC in different regions of MPOS.
    Second the automation should also check certain validations of product, location and are part of SNP-ECC master data and are these new combinations.
    Could someone guide us in this process.
    Thanks
    Kumar

    Praveen,
    The short answer is to move the data into infoproviders or flat files for all of the 'characteristic-type' source data; and then copy CVCs from the infoproviders into the Planning area, probably using one or more Process Chains (program /SAPAPO/TS_PLOB_MAINTAIN).
    The long answer is that this is not a trivial undertaking; this could end up being a pretty involved solution.  If you do not have enough BW/DP expertise available locally to create this solution for you, then I recommend you consider engaging external resources to assist you.  I personally wouldn't even consider starting to work on such a solution without first knowing a lot more about the detailed business requirements, and about any existing solutions that may already in place.  An SCN forum is not really suitable for such an answer.  In my opinion, the BBP doc alone would be 20+ pages, assuming no enhancements..
    Best Regards,
    DB49

  • Image Processing Algorithms - From Matlab to Pixel Bender

    Hello.
    Got a few Image Processing (Mainly Image Enhancement) Algorithms I created in Matlab.
    I would like to make them run on Photoshop, Create a Plug In out of it.
    Would Pixel Bender be the right way doing it?
    The Algorithms mainly use Convolutions and Fourier Domain operations.
    All I need is a simple Preview Window and few Sliders, Dropbox and Buttons.
    I'd appreciate your help.

    pixel vs float - Couldn't figure out what exactly is the difference if there is at all. I assume Pixel always get clipped into [0 1] and float won't until it gets to be shown on the screen as an output?
    There is no difference between them. At one stage of development we had some ideas about the way the pixel type should work that would make it different to float, but the ideas never came to anything and by the time we realized that it was too late to change. It's #1 on my list of "mistakes we made when developing Pixel Bender".
    Regions - Let me see if I get is straight. For the example assuming Gaussian Blur Kernel of Radius 5 (Not the STD, but the radius - a 11x11 Matrix). I should use "needed()" in order to define the support of each pixel output in the input image. I should do it to make sure no one changes those values before the output pixel is calculated.
    Now, In the documentation is goes needed(region outputRegion, imageRef inputIndex). Should I assume that at default the outputRegion is actually the sampled pixel in the input? Now I use outset(outputRegion, float2(x, y)) to enlarge the "Safe Zone". I don't get this float2 number. Let's say it's (4, 3) and the current pixel is (10, 10). Now the safe zone goes 4 pixel to the left, 4 to the right, 3 up and 3 down? I assume it actually creates a rectangle area, right? Back to our example I should set outset(outputRegion, float2(5.0, 5.0)) right?
    Needed is the function the system calls to answer the question "what area of the input do I need in order to calculate a particular area of the output?".
    I should do it to make sure no one changes those values before the output pixel is calculated.
    No, you should do it to make sure the input pixel values needed to compute the output pixel values have been calculated and stored.
    Should I assume that at default the outputRegion is actually the sampled pixel in the input?
    No. When "the system" (i.e. After Effects, PB toolkit or the Photoshop plugin) decides it wants to display a particular area of the output, it will call the needed function with that area in the outputRegion parameter. The job of the needed function is to take whatever output region it is given and work out what input area is required to compute it correctly.
    Let's say it's (4, 3) and the current pixel is (10, 10).
    Don't think in terms of "current pixel" when you're looking at the needed function. The region functions are not called on a per-pixel basis, they are called once at the start of computing the frame, before we do the computation for each pixel.
    Back to our example I should set outset(outputRegion, float2(5.0, 5.0)) right?
    Yes - you're correct. Whatever size the output region is, you require an input region that has an additional border of 5 pixels all round to calculate it correctly.

Maybe you are looking for

  • Why can't I register my PSP to my PS3?

    Supposed to connect PSP to PS3 via USB cable. After doing so PSP says "please wait" and PS3 says "PSP not hooked up" Huh? The cable is clearly connected. There are no further instructions. PSP has turned out to be the biggest waste of $249.00 possibl

  • OSS Note 128947

    Hi, I have 2 order items that are closed but still show up in MD04. I am applying OSS NOTE 128947 : Correction of SD document indexes. I will be running report SDRQCR21. But at the bottom of the report it says that "The SDRQCR21 report works incorrec

  • Convert spool job to PDF

    Hi everyone, i generated an XML string using Chart Designer. i display my chart by using classes cl_gui_custom_container and cl_gui_chart_engine. what i want to do now is run my program as a job in the background and convert the generated spool reque

  • How can we reduce this to single query???

    I need record from table1 where field matches the data of other table OR belongs to some date. Select field    from table1    into table result1    where ldate = p_date. Select field    from table1    into table result2    for all entires in table2  

  • JSTL : problems with sql:query /forEach  tag

    I am not able to iterate thru the resultset provided by <sql:query> tag in JSTL. rowcount and columnName works, which means that query does produce a resultset. However, the <c:forEach> tag doesnt display the retrieved data. Code is approx like: c:ca