Std ViewScreenShot/ja: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
|[[Std_DlgParameter|Std DlgParameter]]
|[[Std_SceneInspector|Std SceneInspector]]
|[[Std_Tools_Menu|Std Tools Menu]]
|IconL=Std_DlgParameter.svg
|IconR=
|IconC=Freecad.svg
}}

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{GuiCommand/jp|Name=Std_ViewScreenShot|MenuLocation=Tools -> Save picture...|Workbenches=All|SeeAlso=...}}
{{GuiCommand/jp|Name=Std_ViewScreenShot|MenuLocation=Tools -> Save picture...|Workbenches=All|SeeAlso=...}}
</div>
</div>


== Description ==
==Description==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 13: Line 23:
さらにパラメーターにアクセスするための"Options"ボタンを使ってスクリーンショットの
さらにパラメーターにアクセスするための"Options"ボタンを使ってスクリーンショットの
アスペクト比や解像度を変更することも可能です。
アスペクト比や解像度を変更することも可能です。
</div>
</div>


[[Image:Save_picture.png]]
<div class="mw-translate-fuzzy">
{{Caption|The Save picture dialog box after pressing the Extended button}}
またPNGやJPEGといった一部の画像フォーマットでは画像のコメントフィールドを使用して
[[MIBA/jp|MIBA]]情報を画像に付加することも可能です。
</div>


==Usage==
==Usage==


# Select the {{MenuCommand|View → [[Image:Std_ViewScreenShot.svg|16px]] Save picture...}} option from the menu.
# There are several ways to invoke this command:
# The Save picture dialog box opens.
#* Pressing the {{KEY|[[File:Std ViewScreenShot.svg|16px|Std ViewScreenShot|link=Std ViewScreenShot]] [[Std ViewScreenShot|Std ViewScreenShot]]}} button in the toolbar
# Optionally press the {{Button|Extended}} button to reveal an additional panel in the dialog box. For more information see [[#Options|Options]].
#* Using the {{MenuCommand|{{StdMenu|[[Std Tools Menu|Tools]]}} → Save picture...}} menu.
# Optionally browse to the correct folder.
#* via [[#Scripting|Python scripting]]
# Enter a filename and select the file type.
'''Result:''' A dialog will open requesting some parameters
# Press the {{Button|Save}} button to create the image file and close the dialog box.


==Options==
==Options==


===Image dimensions===
<div class="mw-translate-fuzzy">
==== 画像フォーマット ====
FreeCADは画像保存のためにQTに組み込まれた画像タイプとbin/imageformatsディレクトリにある一部のQTプラグインを使用しています。
従って選択できるフォーマットの種類と数はあなたの使用しているプラットフォームに依存します。
==== ダイアログ ====


* Select a standard size from the '''Standard sizes''' dropdown list. Or specify the '''Width''' and '''Height''' for a custom size.
[[Image:Save_picture.png|550px]]
* Optionally press an '''Aspect ratio''' button to set the width-to-height ratio of the image. If the '''Width''' input box has the focus the height of the image will change and vice versa.
</div>


===Image properties===
[[Image:Save_picture.png|550px]]


* Select an option from the '''Background''' dropdown list:
===== 画像サイズ =====
** '''Current'''. This option uses the background of the 3D view.
画像サイズパラメーターはアクティブな3Dビューのスクリーンサイズに設定されますが任意の値に変更することができます。一部のOpenGLのドライバーでは8000ピクセルを超えたレンダリングができないことがあります。これは使用しているシステムによって変わります。
** '''White'''.
** '''Black'''.
** '''Transparent'''. Not all image formats support transparency.
* Select an option from the '''Creation method''' dropdown list:
** '''Offscreen (New)'''. This is the default method. This method supports [https://en.wikipedia.org/wiki/Multisample_anti-aliasing anti-aliasing]. ''Technical information: The most important classes for this method are Qt's QOffscreenSurface and QOpenGLFramebufferObject.''
** '''Offscreen (Old)'''. This method does not work on many modern Linux systems as it relies on the graphics driver. This method does not support anti-aliasing. ''Technical information: This is a real off-screen rendering method that only uses functions from the Coin3d library.''
** '''Framebuffer (custom)'''. This method supports anti-aliasing. ''Technical information: If anti-aliasing is off, this method reads the image directly from the graphics renderer, else it renders to a framebuffer and gets the image from there. The key part of this method is Qt's QOpenGLFramebufferObject class.''
** '''Framebuffer (as is)'''. This method uses the same techniques as '''Framebuffer (custom)'''. It also supports anti-aliasing but has some limitations related to custom sizes and always uses the current background of the 3D view.


===Image comment===
四つのボタンを使用してアスペクトを特定の値に変更することが可能です。


* Select the {{RadioButton|TRUE|Insert MIBA}} option to add [[MIBA]] information to the file. Not all image formats support this.
===== 画像の背景 =====
* Or select the {{RadioButton|TRUE|Insert comment}} option and type a comment in the text field to embed a comment in the file. Not all image formats support this.
* Check the {{CheckBox|TRUE|Add watermark}} checkbox to add a watermark. The watermark is placed in the lower left corner of the image and consists of the FreeCAD logo and name above the main FreeCAD URL: [http://www.freecadweb.org www.freecadweb.org].


==Notes==
このコンボボックスを使用して作成する画像の背景を選択することが可能です。
* '''Current''' (ユーザー設定で選択されている)現在のビューの背景を使用します
* '''White''' 白一色の背景を作成します(例えば印刷時に使用します)
* '''Black''' 黒一色の背景
* '''Transparent''' 透過色をサポートしている画像フォーマットで透過背景を作成します


* The number of available image file formats may vary depending on your OS.
===== Creation method =====
* Some OpenGL drivers don't allow renderings above a certain maximum size.
With this combo box you can set how the image data is collected (rendered):
* '''Framebuffer (custom)''': It uses the same technique as '''Framebuffer (as is)'''. Additionally it allows to set custom sizes and the background.
* '''Framebuffer (as is)''': If [https://en.wikipedia.org/wiki/Multisample_anti-aliasing multi-sampling anti-aliasing] is off, it reads the image directly from the graphic renderer. If multi-sampling is on, it renders to a framebuffer and gets the image from there. (The key part of this method is Qt's QOpenGLFramebufferObject class.)
* '''Offscreen (new)''': This is the default method. It is a replacement/alternative for the '''Offscreen (old)''' rendering. Additionally it supports multi-sampling. (The most important classes are Qt's QOffscreenSurface and QOpenGLFramebufferObject.)
* '''Offscreen (old)''': It only uses functions from the library Coin3d. This method does not support multi-sampling, relies heavily on graphic driver and on many modern Linux systems it does not work. It is a real off-screen rendering method that doesn't require an OpenGL window.


==Preferences==
To turn on multi-sampling (anti-aliasing), use the option '''[[Preferences_Editor#3D_View|Anti-Aliasing]]''' in the [[Preferences_Editor|preferences]].


* The 3D view background can be changed in the preferences: {{MenuCommand|Edit → Preferences... → Display → Colors → Background color}}. See [[Preferences_Editor#Colors|Preferences Editor]].
===== Comment =====
* To change the 3D view anti-aliasing: {{MenuCommand|Edit → Preferences... → Display → 3D view → Rendering → Anti-Aliasing}}. See [[Preferences_Editor#3D_View|Preferences Editor]].
Some image formats can embed a comment in to the picture. In case you choose one of this formats you can insert a comment or use the comment field for the '''[[MIBA]]''' information.


==Scripting==
<div class="mw-translate-fuzzy">
==== スクリプト処理 ====


It is possible to create screenshots with python code.
Pythonによってスクリーンを保存することもできます:


Gui.ActiveDocument.ActiveView.saveImage('C:/temp/test.png',1656,783,'Current')

このスクリプトは異なるサイズ、異なる始点で複数の画像を作成します。
カメラのタイプ、つまり正投影か透視投影かを変更することもできます。

import Part,PartGui
# テスト用パーツを読み込み
Part.open("C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Blade.stp")
OutDir = 'c:/temp/'
# 異なるビュー、カメラ、サイズで画像を作成
for p in ["PerspectiveCamera","OrthographicCamera"]:
Gui.SendMsgToActiveView(p)
for f in ["ViewAxo","ViewFront","ViewTop"]:
Gui.SendMsgToActiveView(f)
for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]:
Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".jpg",x,y,"White")
Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".png",x,y,"Transparent")
# アクティブなドキュメントを閉じます
App.closeDocument(App.ActiveDocument.Name)
</div>
{{Code|code=
{{Code|code=
Gui.ActiveDocument.ActiveView.saveImage('C:/temp/test.png',1656,783,'Current')
Gui.ActiveDocument.ActiveView.saveImage('C:/temp/test.png',1656,783,'Current')
}}
}}

This script makes a series of pictures of different sizes and from different
points of view. The type of the camera, i.e. orthographic or perspective can also be changed.
This script saves a series of screenshots of different sizes and from different directions. The camera type, orthographic or perspective, is also changed.


{{Code|code=
{{Code|code=
import Part,PartGui
import Part, PartGui
# loading test part
# Loading test part
Part.open("C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Blade.stp")
Part.open('C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Blade.stp')
OutDir = 'c:/temp/'
OutDir = 'C:/temp/'
# creating images with different Views, Cameras and sizes
# Creating images with different Views, Cameras and sizes
for p in ["PerspectiveCamera","OrthographicCamera"]:
for p in ['PerspectiveCamera','OrthographicCamera']:
Gui.SendMsgToActiveView(p)
Gui.SendMsgToActiveView(p)
for f in ["ViewAxo","ViewFront","ViewTop"]:
for f in ['ViewAxo','ViewFront','ViewTop']:
Gui.SendMsgToActiveView(f)
Gui.SendMsgToActiveView(f)
for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]:
for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]:
Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".jpg",x,y,"White")
Gui.ActiveDocument.ActiveView.saveImage(OutDir + 'Blade_' + p +'_' + f + '_' + `x` + '_' + `y` + '.jpg',x,y,'White')
Gui.ActiveDocument.ActiveView.saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".png",x,y,"Transparent")
Gui.ActiveDocument.ActiveView.saveImage(OutDir + 'Blade_' + p +'_' + f + '_' + `x` + '_' + `y` + '.png',x,y,'Transparent')


# close active document
# Close active document
App.closeDocument(App.ActiveDocument.Name)
App.closeDocument(App.ActiveDocument.Name)
}}
}}


{{clear}}
{{Docnav
|[[Std_DlgParameter|Std DlgParameter]]
|[[Std_SceneInspector|Std SceneInspector]]
|[[Std_Tools_Menu|Std Tools Menu]]
|IconL=Std_DlgParameter.svg
|IconR=
|IconC=Freecad.svg
}}


{{Std Base navi{{#translation:}}}} <!--Do not add this line inside of translation tags -->
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

{{clear}}
{{Userdocnavi{{#translation:}}}} <!--Do not add this line inside of translation tags -->

Revision as of 06:33, 3 May 2020

Description

概要

このコマンドは現在の3Dビューの内容をファイルに保存するためのダイアログを開きます。 このダイアログでは様々な画像フォーマットで保存を行うことができます。 さらにパラメーターにアクセスするための"Options"ボタンを使ってスクリーンショットの アスペクト比や解像度を変更することも可能です。

The Save picture dialog box after pressing the Extended button

Usage

  1. Select the View → Save picture... option from the menu.
  2. The Save picture dialog box opens.
  3. Optionally press the Extended button to reveal an additional panel in the dialog box. For more information see Options.
  4. Optionally browse to the correct folder.
  5. Enter a filename and select the file type.
  6. Press the Save button to create the image file and close the dialog box.

Options

Image dimensions

  • Select a standard size from the Standard sizes dropdown list. Or specify the Width and Height for a custom size.
  • Optionally press an Aspect ratio button to set the width-to-height ratio of the image. If the Width input box has the focus the height of the image will change and vice versa.

Image properties

  • Select an option from the Background dropdown list:
    • Current. This option uses the background of the 3D view.
    • White.
    • Black.
    • Transparent. Not all image formats support transparency.
  • Select an option from the Creation method dropdown list:
    • Offscreen (New). This is the default method. This method supports anti-aliasing. Technical information: The most important classes for this method are Qt's QOffscreenSurface and QOpenGLFramebufferObject.
    • Offscreen (Old). This method does not work on many modern Linux systems as it relies on the graphics driver. This method does not support anti-aliasing. Technical information: This is a real off-screen rendering method that only uses functions from the Coin3d library.
    • Framebuffer (custom). This method supports anti-aliasing. Technical information: If anti-aliasing is off, this method reads the image directly from the graphics renderer, else it renders to a framebuffer and gets the image from there. The key part of this method is Qt's QOpenGLFramebufferObject class.
    • Framebuffer (as is). This method uses the same techniques as Framebuffer (custom). It also supports anti-aliasing but has some limitations related to custom sizes and always uses the current background of the 3D view.

Image comment

  • Select the Insert MIBA option to add MIBA information to the file. Not all image formats support this.
  • Or select the Insert comment option and type a comment in the text field to embed a comment in the file. Not all image formats support this.
  • Check the Add watermark checkbox to add a watermark. The watermark is placed in the lower left corner of the image and consists of the FreeCAD logo and name above the main FreeCAD URL: www.freecadweb.org.

Notes

  • The number of available image file formats may vary depending on your OS.
  • Some OpenGL drivers don't allow renderings above a certain maximum size.

Preferences

  • The 3D view background can be changed in the preferences: Edit → Preferences... → Display → Colors → Background color. See Preferences Editor.
  • To change the 3D view anti-aliasing: Edit → Preferences... → Display → 3D view → Rendering → Anti-Aliasing. See Preferences Editor.

Scripting

It is possible to create screenshots with python code.

Gui.ActiveDocument.ActiveView.saveImage('C:/temp/test.png',1656,783,'Current')

This script saves a series of screenshots of different sizes and from different directions. The camera type, orthographic or perspective, is also changed.

import Part, PartGui
# Loading test part
Part.open('C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Blade.stp')
OutDir = 'C:/temp/'
 
# Creating images with different Views, Cameras and sizes
for p in ['PerspectiveCamera','OrthographicCamera']:
    Gui.SendMsgToActiveView(p)
    for f in ['ViewAxo','ViewFront','ViewTop']:
        Gui.SendMsgToActiveView(f)
        for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]:
            Gui.ActiveDocument.ActiveView.saveImage(OutDir + 'Blade_' + p +'_' + f + '_' + `x` + '_' + `y` + '.jpg',x,y,'White')
            Gui.ActiveDocument.ActiveView.saveImage(OutDir + 'Blade_' + p +'_' + f + '_' + `x` + '_' + `y` + '.png',x,y,'Transparent')

# Close active document
App.closeDocument(App.ActiveDocument.Name)