seedRandom (index, true) generates each image a new number. Why?
Hi, I would like to understand why this code here:
j = 0;
Accum = 0;
seedRandom (index, true);
While (j < time) {}
Accum += random (10);
j += thisComp.frameDuration;
}
Random (100)
generates a different number for each image. But this one:
seedRandom (index, true);
Random (100)
doesn't work. Can someone explain this please?
The random number generator generates a different number each time it is called.
In your expression, on the chassis of the IE of your comp, you call the number generator random I time and take the result from the last call.
If you always take the result of the first call, the result would be the same on each image.
Tags: After Effects
Similar Questions
-
slide show code generating random images with clickable links
I make a slide show with images that occur randomly wch hav clickable links, OK it works but sometimes, the transition is very fast instead of the 8 s interval I expected, when I discovered the exit trace(), I noticed that sometimes the timer is triggered two times or more at the same time... my code is below... What perhaps may cause well u want to help
I have 21 pictures with 21 images
Import fl.transitions.Tween;
Fl.transitions.easing import. *;
Import fl.transitions.TweenEvent;
import flash.events.MouseEvent;
Stop(); slide stops
var total_images:Number = 21;
var my_playback_counter:Number = 0;
showslide(); call to the showslide function
defination function with the timer event
function showslide (): void {}
var myTimer:Timer = new Timer (8000);
myTimer.addEventListener (TimerEvent.TIMER, timerListener);
myTimer.start ();
}
/ * function timelistener
After 8 s, meter reading in increments of 1.
Then reset to 0 playbckcounter if it is equal to total images
*/
function timerListener (e:TimerEvent): void {}
my_playback_counter = my_playback_counter + 1;
If (my_playback_counter == total_images) {}
my_playback_counter = 0;
}
trace ("Timer is triggered"); trace when the timer goes off
NextImage();
}
function NextImage (): void {}
var pic_number:Number = 21;
var randomframe:Number = Math.ceil (Math.random () * pic_number) ;// randomly generates betwwen number 1 and 5
trace (randomframe);
gotoAndStop (randomframe); display a random image
}
Button1.addEventListener (MouseEvent.CLICK, onMouseClickB1);
function onMouseClickB1(e:MouseEvent):void {}
var request: URLRequest = new URLRequest ("http://www.aginternetwork.org/en/");
navigateToURL (request, "_blank");
}
new Tween(btn1,"alpha",None.easeOut,0,1,1,true);
Each time the playhead returns to frame where this code is another instance of Timer will be created. Try to put a conditional on the showslide function call so that he will not repeat...
var showStarted:Boolean; by assigning not it is null or false
{if(!showStarted)}
showslide()
showStarted = true; but once they assign remains true
}
-
1. I started a lazy image loader to download images in drawListRow and passed the url of the image to download reference.
2. After downloading the respective bitmap in the lazy image loader, I cancelled the list (called by using a reference to the screen where images are to shoot) using a thread event as follows:
UiApplication.getUiApplication().invokeLater(new Runnable() { public void run() { _list.invalidate(); } });
But my images are updated on the screen until I scroll over the line in the list. I also tried to use _list.invalidate (index) to invalidate each line once the image is drawn to this particular line, but it does work and does the same thing as _list.invalidate ().
I want the images to be updated without scrolling, and as soon as they are downloaded. How do I get there?
Valuable contributions will be highly appreciated.
UiApplication.getUiApplication () .invokeLater (new Runnable() {public void run() {_list.invalidate ();}) } });
use invokeAndWait instead of invokeLater and check if it works or not?
-
By editing the other scripts, I found here and other sites (including the labels size rorohiko), I worked on a script that will each image with the dimensions of the label and calculate the percentage of the spread of everything (including the text, white space).
Now, I was invited to a script that tagged the images with the percentage of total image on a gap space. This script is so space images on a total gap, then tag each image with the percentage of the total image space. For example if there is an image that is 10 x 10 inches and four pictures that are images of 2.5x2.5, 10 x 10 would be tagged with 50% and the 2.5x2.5 would be tagged with 12.5%.
This is the script that does the percentage of total circulation. Can some clever person get to do what I need?
Suze
(Sorry, I don't know how to post the script here with line numbers!)
//
This script adds printing of information labels to each graphic image. The labels are on a separate layer
named "PercentageLabels" so that all these added labels can be removed again by simply removing
the layer.
//
If you move or resize items, simply re-run the script to update the labels.
//
Before (re) start the script, you can define a paragraph style "SizeLabelStyle".
This style will apply to all content on labels.
//
Before (re) start the script, you can set a style of object 'SizeLabelObjectStyle '.
This style of object apply to all executives of the label - so if you want a specific background
fill out or frame, do it through this object style.
//
You can change the units of the size label. I put in inches. Change the line below that has
kUnitToUse - you can use:
MeasurementUnits.CENTIMETERS
MeasurementUnits.CICERO
MeasurementUnits.INCHES
MeasurementUnits.MILLIMETERS
MeasurementUnits.PICAS
MeasurementUnits.PIXELS
MeasurementUnits.POINTS
//
By default the script will not attempt to label the "nested" images If you also want to label
nested images (for example inline images, anchored frames, pasted images in the images,...) to change the line
below to read:
kLabelNestedItems = 1
//
If you want a specific image to stay without a label, you can use the Script label palette for
assign a script called 'ignore' for this frame. The script will then not label this framework to the
the title of the script is removed again.
//
Change the lines with kDontLabelImageFrames, kDontLabelTextFrames, kDontLabelOtherFrames
below if you want to restrict labelling to only certain types of images: replace the '0'
in "1" to enable these options.
//
Change the line with kShowImageFileName if you also want to display the names of the image in the
size for the picture frames.
//
Small frames are not labelled - the cutoff point is currently a less than 0.1 inch high framework
or 0.1 inch wide. You can change the cutoff point by adjusting the lines with kDontLabelBelowWidth
or kDontLabelBelowHeight below.
//
var Girard;
var gScriptFile;
var gCaches;
// ****************
That's cheating spread automatically calculated
var doc = app.activeDocument;
doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;
doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;
PageWidth = doc.documentPreferences.pageWidth var;
stucture var pagewidth = * 2;
var spreadheight = doc.documentPreferences.pageHeight;
var spreadsquinch = stucture * spreadheight;
Alert ("the total measure of square inch of spread is:" + spreadsquinch);
//******************
VR;
{
If (app.activeScript instanceof file)
{
var gScriptFile = app.activeScript;
}
}
catch (Girard)
{
}
If (typeof (kLogLevel) is "undefined")
{
const kLogLevel = 5;
const kMaxLogNestLevel = 5;
const kLogToMessageBox = 0;
const kLogToConsole = 0;
const kLogToFile = 0;
const kLogFileName = "PercentageLabels.log";
const kIgnoreFrameLabel = "ignore."
const kSizeLabelLayerName = "PercentageLabels";
const kLabelNestedItems = 0;
const kDontLabelImageFrames = 0;
const kDontLabelTextFrames = 1;
const kDontLabelOtherFrames = 0;
const kUnitToUse = MeasurementUnits.INCHES;
const kShowImageFileName = 0; This set to 1 to precede the name of the image file in the tag
Below all of the measures are expressed in kUnitToUse (e.g. inches if MeasurementUnits.INCHES is used)
const kRoundToDecimals = 2;
The separator to use between objects - for example MyImage.jpg - 7.22 x 9,34
const kSeparatorBetweenNameAndSize = "-";
const kSeparatorBetweenHeightAndWidth = "H x"; "
const kSeparatorAfterWidth = "W";
const kDontLabelBelowWidth = 0.1; In kUnitToUse
const kDontLabelBelowHeight = 0.1; In kUnitToUse
const kLabelStyleName = "SizeLabelStyle";
const kLabelObjectStyleName = "SizeLabelObjectStyle";
const kLabelHeight = 0.6; In kUnitToUse
const kLabelWidth = 2.5; Expressed in kUnitToUse (e.g., inches).
}
var gRunState =
{
logToMessageBox: kLogToMessageBox,
logToConsole: kLogToConsole,.
logToFile: kLogToFile,.
functionNestLevel: 0,
logFunctionEntry: true,
logFunctionExit: true,
logLevel: kLogLevel,.
logFileName: kLogFileName
};
Main();
// ****************
function ConvertToFrame (thePageItem)
{
/ * / / / LogEntry ("ConvertToFrame");
var retVal = thePageItem.getElements () [0];
/ * / / / LogExit ("ConvertToFrame");
Return retVal;
}
// ****************
function CollectionToArray (theCollection)
{
/ * / / / LogEntry ("CollectionToArray");
var retVal = theCollection.everyItem () .getElements () .slice (0);
/ * / / / LogExit ("CollectionToArray");
Return retVal;
}
// ****************
function GetImageFile (pageItem)
{
/ * / / / LogEntry ("GetImageFile");
var imageFile = null;
do
{
Try
{
pageItem = ConvertToFrame (pageItem);
If (!) (("allGraphics" in pageItem))
{
break;
}
var allGraphics = pageItem.allGraphics.slice (0);
If (allGraphics.length == 0)
{
break;
}
var chart = allGraphics [0];
var graphic.itemLink = link;
imageFile = new File (link.filePath);
}
catch (Girard)
{
}
}
While (false);
/ * / / / LogExit ("GetImageFile");
return imageFile.
}
// ****************
function GetImageName (pageItem)
{
/ * / / / LogEntry ("GetImageName");
var imageName = "";
do
{
var imageFile = GetImageFile (pageItem);
If (imageFile is nothing)
{
break;
}
imageName = imageFile.displayName;
}
While (false);
/ * / / / LogExit ("GetImageName");
return imageName;
}
// ****************
function GetOuterPageItem (pageItem)
{
/ * / / / LogEntry ("GetOuterPageItem");
var retVal = null;
do
{
Try
{
retVal = pageItem.parent;
If (retVal instanceof spread | retVal instanceof Page)
{
retVal = pageItem;
break;
}
If (retVal instanceof character)
{
retVal = GetOuterPageItem(retVal.parentTextFrames[0]);
break;
}
}
catch (Girard)
{
retVal = null;
}
}
While (false);
/ * / / / LogExit ("GetOuterPageItem");
Return retVal;
}
// ****************
function LogMessage (message, collapseLines)
{
If (gRunState.logToConsole)
{
$.writeln (message);
}
If (gRunState.logToFile)
{
var logFile = new file (gScriptFile.parent + "/" + gRunState.logFileName);
var now = new Date();
logFile.open ("a");
logFile.write (now.toString () + ":"+ message + "\n" ');
logFile.close ();
}
If (gRunState.logToMessageBox)
{
Alert (message);
}
}
// ****************
LogEntry (message) function
{
If (gRunState.logFunctionEntry)
{
If (gRunState.functionNestLevel < kMaxLogNestLevel) {}
for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)
{
message = "" + message;
}
Filled (message + "<", true);
}
}
gRunState.functionNestLevel ++;
}
// ****************
function LogError (message)
{
If (gRunState.logLevel > = 1).
{
LogMessage ("* ERROR *:" + message, false);
}
}
// ****************
function LogExit (message)
{
-gRunState.functionNestLevel;
If (gRunState.functionNestLevel < 0)
{
LogError ("LogExit: unbalanced nesting of function");
}
If (gRunState.logFunctionExit)
{
If (gRunState.functionNestLevel < kMaxLogNestLevel) {}
for (var idx = 0; idx < gRunState.functionNestLevel; idx ++)
{
message = "" + message;
}
Filled (message + ">", true);
}
}
}
// ****************
function LogNote (message)
{
If (gRunState.logLevel > = 3)
{
LogMessage ("Note:" + message, false);
}
}
// ****************
function LogWarning (message)
{
If (gRunState.logLevel > = 2)
{
LogMessage ("WARNING:" + message, false);
}
}
// ****************
function Main()
{
/ * / / / LogEntry ("Main");
var savedUserInteractionLevel = app.scriptPreferences.userInteractionLevel;
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
do
{
Try
{
activeDocument var = app.activeDocument;
If (!.) (activeDocument instanceof Document))
{
LogError ("hand: activeDocument isn't a Document");
break;
}
var savedHorizontalMeasurementUnits = activeDocument.viewPreferences.horizontalMeasurementUnits;
activeDocument.viewPreferences.horizontalMeasurementUnits = kUnitToUse;
var savedVerticalMeasurementUnits = activeDocument.viewPreferences.verticalMeasurementUnits;
activeDocument.viewPreferences.verticalMeasurementUnits = kUnitToUse;
var savedRulerOrigin = activeDocument.viewPreferences.rulerOrigin;
activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
do
{
Try
{
ProcessFrames (activeDocument);
}
catch (Girard)
{
Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."
}
}
While (false);
activeDocument.viewPreferences.rulerOrigin = savedRulerOrigin;
activeDocument.viewPreferences.horizontalMeasurementUnits = savedHorizontalMeasurementUnits;
activeDocument.viewPreferences.verticalMeasurementUnits = savedVerticalMeasurementUnits;
}
catch (Girard)
{
Alert ("the script encountered a situation that we don't know how to handle. "He received the error, says '" + Parker + "' in Main()"); "."
LogError ("Hand throw" + Girard);
}
}
While (false);
app.scriptPreferences.userInteractionLevel = savedUserInteractionLevel;
/ * / / / LogExit ("Main");
}
// ****************
function ProcessFrames (doc)
{
/ * / / / LogEntry ("ProcessFrames");
var err;
do
{
If (!.) (doc instanceof Document))
{
LogError ("ProcessFrames: doc should be a Document");
break;
}
Try
{
var existingLayer = doc.layers.itemByName (kSizeLabelLayerName);
existingLayer.id;
existingLayer.remove ();
}
catch (err)
{
}
If (kLabelNestedItems)
{
var pageItems = doc.allPageItems.slice (0);
}
on the other
{
var pageItems = CollectionToArray (doc.pageItems);
}
var frameReferences = [];
for (var pageItemIdx = 0; pageItemIdx < pageItems.length; pageItemIdx ++)
{
do
{
var pageItem = pageItems [pageItemIdx];
If (pageItem.itemLayer.name is kSizeLabelLayerName)
{
break;
}
var pageItem = ConvertToFrame (pageItem);
If (instanceof TextFrame pageItem)
{
If (kDontLabelTextFrames)
{
break;
}
}
ElseIf (pageItem graphic instanceof)
{
If (kDontLabelImageFrames)
{
break;
}
}
on the other
{
If (kDontLabelOtherFrames)
{
break;
}
}
If (pageItem.label.toLowerCase () is kIgnoreFrameLabel)
{
break;
}
var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];
var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];
If (width < kDontLabelBelowWidth)
{
break;
}
If (height, kDontLabelBelowHeight)
{
break;
}
frameReferences.push (pageItem);
}
While (false);
}
var sizeLabelLayer = doc.layers.add ({name: kSizeLabelLayerName});
for (var pageItemIdx = 0; pageItemIdx < frameReferences.length; pageItemIdx ++)
{
Try
{
var pageItem = frameReferences [pageItemIdx];
var width = pageItem.geometricBounds [3] - pageItem.geometricBounds [1];
var height = pageItem.geometricBounds [2] - pageItem.geometricBounds [0];
var labelItem = doc.textFrames.add (null, LocationOptions.BEFORE, GetOuterPageItem (pageItem));
labelItem.itemLayer = sizeLabelLayer;
var boxsquinch = width * height
var boxpercent = (boxsquinch / spreadsquinch) * 100
var roundpercent = Math.round (boxpercent)
var labelText = "";
If (kShowImageFileName)
{
var imageName = GetImageName (pageItem);
If (imageName! = "")
{
labelText += imageName + kSeparatorBetweenNameAndSize;
}
}
labelText += RoundString (height, kRoundToDecimals) + kSeparatorBetweenHeightAndWidth + RoundString(width, kRoundToDecimals) + kSeparatorAfterWidth + ' \r\n'+ roundpercent + '% ';
labelItem.contents = labelText;
xPos = pageItem.geometricBounds var [1];
yPos = pageItem.geometricBounds var [0] + kLabelHeight;
labelItem.geometricBounds is [Posy, xPos, yPos + kLabelHeight, xPos + kLabelWidth];.
Try
{
labelItem.parentStory.characters.everyItem () .appliedCharacterStyle = doc.characterStyles.item (0);
}
catch (err)
{
}
Try
{
labelItem.parentStory.paragraphs.everyItem () .appliedParagraphStyle = kLabelStyleName;
}
catch (err)
{
}
Try
{
labelItem.appliedObjectStyle = doc.objectStyles.itemByName (kLabelObjectStyleName);
}
catch (err)
{
}
}
catch (err)
{
}
}
}
While (false);
/ * / / / LogExit ("ProcessFrames");
}
// ****************
function RoundString (numVal, decimal)
{
/ * / / / LogEntry ("Round");
var retVal = Math.round (numVal * Math.pow(10,decimals)) + "";
retVal = retVal.substring(0,retVal.length-decimals) + "." + retVal.substring(retVal.length-decimals);
/ * / / / LogExit ("Round");
Return retVal;
}
What do you mean?
var myDoc = app.activeDocument; var mySpreads = myDoc.spreads; var myRectangles = myDoc.rectangles; var myImages = 0; for (var i = 0; i < mySpreads.length; i++) { var mySpreadWidth = 0; var mySpreadHeight = myDoc.documentPreferences.pageHeight; for (var j = 0; j < mySpreads[i].pages.length; j++) { mySpreadWidth += myDoc.documentPreferences.pageWidth; } var mySpreadArea = mySpreadWidth * mySpreadHeight; var myImages = mySpreads[i].rectangles; var myTotalImageArea = 0; var myIndividualImageArea = []; for (var j = 0; j < myImages.length; j++) { var myImageGeometricBounds = myImages[j].geometricBounds; var myImageWidth = myImageGeometricBounds[3] - myImageGeometricBounds[1]; var myImageHeight = myImageGeometricBounds[2] - myImageGeometricBounds[0]; myIndividualImageArea[j] = (myImageWidth * myImageHeight); myTotalImageArea += myIndividualImageArea[j]; } for (var j = 0; j < myIndividualImageArea.length; j++) { alert("Image percentage of total images on spread " + (i + 1) + " = " + (myIndividualImageArea[j] * 100) /myTotalImageArea); } alert("Total image percentage on spread " + (i + 1) + " = " + myTotalImageArea); }
-
Impossible to index a table of images images!
Hi all
I encountered this problem lately. I am indexing a number of images in a table using a loop for. Then the array of images (16 bits) is used somewhere else in the program. It is indexed and the images are processed and displayed. The problem is; When you try to index the images of the sets using the table to index the result is the same regardless of the index!
Can someone explain that to me?
Thanks in advance
When you used the IMAQ create VI you specified each image to use the same name of 'image '. Each image must have a unique name. I edited your VI to give a unique name for each image and I could see three different images to three different display components.
-
How can I write a script that will do an event each image?
I basically need a loop that allows of, say add guide in every single frame.
example:
for (int i = 0; I< totalFrames. i++){
AddMarker();
}
This code will process each image on a selected layer.
var myComp = app.project.activeItem, layer = app.project.activeItem.selectedLayers[0], inPoint = layer.inPoint, outPoint = layer.outPoint, frameDur = myComp.frameDuration, myMarker; app.beginUndoGroup("AddMarker"); for(var t = inPoint; t< outPoint; t+=frameDur){ // change outPoint to myComp.duration to process the whole composition myMarker = new MarkerValue(t); // change marker value layer.property("Marker").setValueAtTime(t, myMarker); } app.endUndoGroup();
-
Is it possible to nest a trigger or a composition within each image in a slide show?
Hello
What I'm trying to do, is to have a slideshow with images that open to a large of themselves (in Viewer mode) version when you click on it. I am currently reach using a Lightbox Composition widget with the trigger placed over the image in the slide show, I would like to enlarge.
What I want to do, is to integrate the relaxation or the whole composition in the show, on top of each individual hero image, so that when the slide show images, a new widget/large image Composition change appears.
For example, if the first slide in the slide show is a photo of a flower, clicking on it would open this image of a flower in lightbox view. If the second image is a bicycle, clicking on it will open a lightbox consisting only of the bicycle entirely separate publication.
Is it possible to do this inside the Muse, or get a similar effect? I thought to bind each hero image a separate page that already has the largest lightbox mode activated, but I would like to avoid that if possible.
I suggest you buy a third party for this widget. Visit QooQee Adobe Muse Templates | Muse of the themes | Widgets of Muse and Muse-exempt products or Muse - Themes.com - Adobe Muse Templates | Widgets of Muse and Blog to see if they have created something that will work for you.
-
I am new to use the forums. How to start a discussion? The ICO next which is grayed out.
I have a problem with corruption. How can I change the timeline on an existing project. Each image is moved about 2.5 min.; My preferences are for 180 frames. It does not seem to consider one after the fact. Is it possible to copy the whole thing and put it in a new, m not corrupted project?
Hello and welcome.
I feel for you after reading your story, however, it that are supposed to do? It is a forum for Dreamweaver and to my knowledge, Dreamweaver has no functionality called the chronology.
Could you please explain the problem so that we can understand?
-
How I continuously loop frames with pause for 20 seconds in each image of the scene even without going to the next scene? There are buttons for other scenes in these images. The below works well until I got to the last frame of the scene, then he goes to the next scene and plays. How can I make one loop continuously.
Stop();
var: timer = new Timer (20000,0); / / <--
timer.addEventListener (TimerEvent.TIMER, timerHandler);
Timer.Start ();
function timerHandler(event:TimerEvent):void {}
this.nextFrame ();
or if you want to jump for example 5 executives
this.gotoAndStop(this.currentFrame+5);
}
Thanks for any help.
If you want to stop your timer, use the stop() method:
Timer.Stop ();
PS when you use the adobe forums, please check the useful/correct, if there is.
-
I worked on the animation of a scene in flash for a few weeks and recently I met a problem with the import of my images to the stage where images I have import increase, however, the keyframe I tried to import the image to watch that it is occupied by an image and each image before the image key that just imported a picture that doesn't show shows up as a red square that fills the perimeters original of the image , there is no solution to this problem all where on the forum and the personal adobe technical support does not help me find a solution to this problem, what can I do to get Flash working normally again and fix this?
After the first time that I publish a preview after I start using the flash, flash makes the publication and the test scene features as useless and claims he has not found an HTML template, or if the images if I import all the images on the stage who empties and display each image before the image as a red square and then try to publish a flash preview renders also the publication and the scene features test as useless and claims he has found none of HTML template. What can I do to fix this? There is no solution on the web anywhere to this problem either.
I discovered the problem, I just need to get a Z820 with a Nvidia Quadro K6000 graphics card and a new Flash Professional subscription, I'm lucky, I did what I did. Thank you!
-
I have created a Master project and a project of the child is linked to it. I have difficulties to see the index in the project of the child. I downloaded and saved and generated the project of the child in itself and the master and the index is not appear. I created a glossary which works, but the index does not. Can someone help me with this please? Thank you!
Image index in the child project Project Manager:
Go to the project settings. Are key words in the Perfect file or subject? You must have at least a keyword in the Perfect file.
If this is not it, create another index with just a few words to the index and generate using that. Any change?
See www.grainge.org for creating tips and RoboHelp
-
Video editing in PS: how to create random noise on each image
Hello PS community,
I do a lot of video editing in PS with my DSLR video files, because I like how PS treats the colours etc and I'm used to all the corrections due to image editing. It needs time for the export/rendering, but for me it is worth.
I'm not really satisfied with the plugins in video editors that simulate the grain, so I thought that I can do better in PS. I created a grain/noise, who expects a lot from me. I created a new layer with noise created with the original PS-noise-plugin and adjust the mode of fusion etc to achieve a look that I like, and it looks great when the movie does not play.
When the movie/animation plays the film will play under this layer of static noise that is unnatural looking.
I want to achieve is that the PS will be made the layer of noise for each new image (creating an individual noise for each image layer) so that the film is natural looking.
Thanks for your help!
Best regards
David
So I suppose you could create an animation of noise and that are superimposed as a smart object, too.
Depending on how long it is supposed to be to avoind, noticing the repetition just create as many noise-layers in a separate file, use the images made of layers and file > export > rendered video.
Or you could create greater noise layer and around shuffle manually in the animation timeline.
But maybe someone else has more insight in this matter.
-
Batch increase canvas based on the proportions of each image
Hello
I'm new to scripting, so expect stupid questions
I need to take pictures of 1900, make them square by increasing the canvas of each image and then convert them to 600x600px
The thing that is stumping me is that each image source has a ratio of different size\aspect
Is this possible?
TIA
I guess you could same Action with file > Automate > Fit Image and then use the canvas size.
But for what is a script, you can simply use a conditional clause:
#target photoshop var myDocument = app.activeDocument; var width = myDocument.width; var height = myDocument.height; if (width > height) { myDocument.resizeCanvas (width, width) } else { myDocument.resizeCanvas (height, height) }; myDocument.resizeImage (new UnitValue(600, "px"), new UnitValue(600, "px"), undefined, ResampleMethod.BICUBIC);
-
Hello
Can someone help me please about an issue I'm facing. Basically, I managed to save five images in a directory, I now want to do is to save each image after a specific time period without interrupting the entire program. I tried to do this with the time elapsed time vi (under the calendar), but do not have to work. I know that it is possible using this vi. I think I have what I do is not the right way. Attached is a screenshot and the vi I haaving problems.
Is that what you want? When you click on the button 'Save 5 images' type of lock, the VI is expected to produce 5 images, with a 3 second delay between them.
Edit: this VI will also wait 3 seconds before you save the first file, if you want the first file to be created when the button is clicked, you must change the VI a little, so you can practice a little more
Edit2: important to stress, that you didn't have any time in your loop to slow it down. If you run these timing loop, your computer tries to run it as soon as possible. This is not a good practice. So I put a wait 50 MS in the loop to be ok with this...
Edit3: I also forgot to connect the cable to your digital indicator "picture #". You can put in the required place and connect the entire meter wire.
-
Each image or photo I watch is saved to the file. How can I disable the who.
Each image or photo I watch is saved to the file. How can I disable the who.
You can not turn it off because it is what allows you to view
the pictures... they are copied into the temporary Internet files
folder.Files can be eliminated by deleting the contents of your
The temporary Internet files folder.If you want to view the contents of your
The temporary Internet files folder... try the following steps...Reach... Start / run... Type or Copy/Paste...the following...
%USERPROFILE%\Local Settings\Temporary Internet Files
Press on... Come in...
Remove all the Temporary Internet Files folder.
More info...
How to find your TIF (Temporary Internet Files) folder.
Open a folder and go... Tools / Folder Options / View tab.
... To check "Show the hidden files and folders" / apply / OK.
Now... you'll find your TIF file to the following location:
C:\Documents and Settings\Votre user Name\ name
Local Settings\Temporary Internet FilesMore information:
(260897) how to remove the content of the
Folder Temporary Internet Files
http://support.Microsoft.com/?kbid=260897Also... to run Disk Cleanup can be worth a try:
(310312) description of the disk cleanup
Tool in Windows XP
http://support.Microsoft.com/?kbid=310312
Maybe you are looking for
-
Toshiba Camileo H20 required tripod connection part
We have some Toshiba Camileo H20, who lend us to students. The connection at the bottom of the camcorder where it twists on the tripod was broken. I tried to get some replacement has not so far. I was in touch with Toshiba who say that it is not a de
-
"Enter your apple id password to erase this iphone and remove it from your account"
all I'm trying to do is to reset my phone to factory settings and it comes up with this, what I do? Please help ASAP!
-
Last night, I disconnected and closed, this morning, when commissioning I found my network dead for me without any link with. In setting network shows no Ethernet. Moved to WIFI and everything works. Simply not cable port to use. Read a rumour tha
-
Card SDHC and AUDIBLE DOWNLOADS
Largely because of the support of this community, I have my 4 GB Sansa Fuze works beautifully. I also have a chip of 2GB that I loaded several AUDIO books on. I finished listening and gave the card to my spouse who has a Sansa 4 GB. When he tried to
-
My wife can not access our photos in windows photo gallery
My wife and I just bought a new computer with an operating system Windows vista Home premium. We share this computer and we each have our own user account. I imported photos from our digital camera in windows photo gallery and I can access and wor