Std ViewScreenShot/スクリーンショットを見る

From FreeCAD Documentation
Revision as of 13:20, 20 December 2018 by Luc (talk | contribs) (Created page with "==== 画像フォーマット ==== FreeCADは画像保存のためにQTに組み込まれた画像タイプとbin/imageformatsディレクトリにある一部のQTプラグ...")

Template:GuiCommand/jp


概要

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

またPNGやJPEGといった一部の画像フォーマットでは画像のコメントフィールドを使用して MIBA情報を画像に付加することも可能です。

This command can also use the image comment field of some image formats, like PNG or JPEG to save MIBA information along with the picture.


画像フォーマット

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

ダイアログ


Image Size

The image size parameters are set to the screen size of the active 3D view. But you can change it to any value you like. Some OpenGL drivers don't allow renderings greater then 8000 pixels. It depends on your system.

With the four buttons you can change the aspect to a certain value.

Image background

With this combo box you can choose the background of the picture you make.

  • Current use the current view background (as chosen in the preferences)
  • White creates a plain white background (for e.g. printings)
  • Black plain black background
  • Transparent creates a transparent background on image formats which support transparency
Comment

Some image formats can transport a comment along 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

It's also possible to save the screen by python:

 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.

 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)