मैं आपको बताऊंगा कि जावास्क्रिप्ट के साथ इसे कैसे करें, क्योंकि यह प्रोग्रामिंग क्यू/ए साइट है।
#target photoshop
// Save the current unit preferences (optional)
var startRulerUnits = app.preferences.rulerUnits
var startTypeUnits = app.preferences.typeUnits
// Set units to PIXELS
app.preferences.rulerUnits = Units.PIXELS
app.preferences.typeUnits = TypeUnits.PIXELS
// Use the top-most document
var doc = app.activeDocument;
var coords = doc.selection.bounds;
// Write coords to textfile on the desktop. Thanks krasatos
var f = File('~/Desktop/coords.txt');
f.open('w');
f.write(coords);
f.close();
// Reset to previous unit prefs (optional)
app.preferences.rulerUnits = startRulerUnits;
app.preferences.typeUnits = startTypeUnits;
इस आयताकार सीमा दे देंगे वर्तमान सक्रिय दस्तावेज़ में चयन की (सीमांकन बॉक्स जैसा कि आप देख जब बदलने के बारे में सोच):
चयन सीमा से आयताकार निर्देशांक प्राप्त करने के लिए सबसे आसान है। यह आदेश minX, minY, maxX, maxY में outputs। सीएसएस निर्देशांक में अनुवाद करने के लिए यह पर्याप्त जानकारी होनी चाहिए।
व्यक्ति बहुभुज अंक के निर्देशांक प्राप्त करने आप एक रास्ता है और उत्पादन इस स्क्रिप्ट का उपयोग रास्ते पर प्रत्येक pathPoint.anchor में चयन कर सकते हैं:
#target photoshop
// Save the current unit preferences (optional)
var startRulerUnits = app.preferences.rulerUnits
var startTypeUnits = app.preferences.typeUnits
// Set units to PIXELS
app.preferences.rulerUnits = Units.PIXELS
app.preferences.typeUnits = TypeUnits.PIXELS
// Use the top-most document
var doc = app.activeDocument;
// Turn the selection into a work path and give it reference
doc.selection.makeWorkPath();
var wPath = doc.pathItems['Work Path'];
// This will be a string with the final output coordinates
var coords = '';
// Loop through all path points and add their anchor coordinates to the output text
for (var i=0; i<wPath.subPathItems[0].pathPoints.length; i++) {
coords += wPath.subPathItems[0].pathPoints[i].anchor + "\n";
}
// Write coords to textfile on the desktop. Thanks krasatos
var f = File('~/Desktop/coords.txt');
f.open('w');
f.write(coords);
f.close();
// Remove the work path
wPath.remove();
// Reset to previous unit prefs (optional)
app.preferences.rulerUnits = startRulerUnits;
app.preferences.typeUnits = startTypeUnits;
निर्देश:
ओपन अपने नक्शे छवि
extendscript साथ स्क्रिप्ट रन भी अपने पसंदीदा चयन उपकरण
का उपयोग कर क्षेत्र की एक चयन बनाओ lkit या फ़ाइल> स्क्रिप्ट> ब्राउज़ करें ... चुनकर और .jsx फ़ाइल का चयन करें जहां स्क्रिप्ट सहेजी गई है।
अच्छा सवाल, + मुझसे वोट दें। – Hoque
तो आप कुछ ऐसा चाहते हैं [यह] (http://davidlynch.org/projects/maphilight/docs/demo_world.html)? मैं जावा, या jQuery जैसे कुछ का उपयोग करने के बारे में सोचता हूँ। एक नज़र डालें [यहां] (http://davidlynch.org/projects/maphilight/docs/) शायद। मुझे नहीं पता कि यह मदद करेगा, लेकिन यह कुछ है। – ACarter