在Windows 10中截取截图的6种方式 简介

在Windows 10中截取截图的6种方式 简介

 

截图对于不同的目的很重要。它可以用于捕获笔记本电脑上的任何内容的截图。所以,如果你使用Windows
10,你可能不知道如何截图,因为它是比较新的。因此,我们展示了5种方式,您可以屏蔽任何东西,特别是如果您使用Windows
10.这里有6种方式在Windows 10中截取截图。

 

截图工具

Snipping工具是Windows的内置截图工具。每个Windows操作笔记本电脑都配有此选项。在Windows
10中查找剪贴工具并不困难。只需在搜索面板中搜索剪贴工具即可。选择Snipping
Tool应用程序。当Snipping工具打开时,单击新建以捕获新的屏幕截图。

 

Windows + Shift + S

使用Windows + Shift + S捕获屏幕的一个区域并将其复制到剪贴板。按下Windows

  • Shift +
    S后,屏幕变暗,并显示一个光标,您可以在屏幕上绘制要在屏幕截图中捕获的区域。绘制要捕获的区域并释放鼠标光标。

 

打印屏幕

点击键盘上的Prtsc按钮。按按钮捕获整个屏幕。现在打开一个图像编辑器,如Paint。按Ctrl

  • V粘贴内容。裁剪后保存图像。

 

Windows键+打印屏幕

此选项捕获您的屏幕截图并自动保存。要捕获整个屏幕并自动保存屏幕截图,请点击Windows
Key +
PrtScn。屏幕会暗淡一秒钟,让您知道屏幕截图已被捕获。现在找到保存的快照在以下位置图片>
Screenshots文件夹。

 

Windows键+ H

如果要捕获整个屏幕进行共享,可以使用Windows Key +
H键盘快捷方式。这将捕获整个屏幕。

 

Alt +打印屏幕

要快速切换活动窗口,请使用键盘快捷键Alt +
PrtScn。这将捕捉您当前活动的窗口,并将截图复制到剪贴板。您将需要在图像编辑器中打开镜头以保

MFC通过系统API将指定窗口导出为图片,方法之一:

来点简单分享,今晚我突然想截取浏览器里面打开的网页,是整一个网页,怎么办额?有两种解决方案

在Android的应用中,有时候我们想仅仅显示一部分图像,这时候就要求图形截图。

在等东西,闲来无事,截张最新的Windows 7的图片上来看看,
不管是UI效果及执行效果都比

BOOL COutputManager::OutputFromWND(IN HWND hWnd, IN RECT rect)

  • Firefox【推荐、高清】
  • gnome-web-photo

1、随意截取图像的方法,以下我们具体介绍一下android中的重要类——Bitmap

winXp(执行效能) 及Vista(UI)有一定的提高,
有兴趣的朋友可以试试,就是偶尔有些莫名奇妙的问题, 

{


public final class

估计正式版后会好很多,

HDC  hDC = ::GetDC(hWnd); //获取屏幕DC

使用Firefox截图

第一步:打开Firefox进入控制台

shift+F2 

第二部:可以进行截图了

  • 截取当前整个网页并下载保存

screenshot fileName --fullpage 
  • 延迟截图

screenshot fileName --delay seconds --fullpage  
  • 截图仅复制到剪切板

screenshot --clipboard --fullpage 

Bitmap

extends Object
implements Parcelable

java.lang.Object

 

android.graphics.Bitmap

以下是Bitmap的全部应用方法,我们要熟悉记住:

公有方法

boolean

compress)(Bitmap.CompressFormat format,
int
quality, OutputStream stream)

Write a compressed version of the bitmap to the specified outputstream.

Bitmap

copy)(Bitmap.Config config,
boolean isMutable)

Tries to make a new bitmap based on the dimensions of this bitmap,
setting the new bitmap’s config to the one specified, and then copying
this bitmap’s pixels into the new bitmap.

void

copyPixelsFromBuffer)(Buffer src)

Copy the pixels from the buffer, beginning at the current position,
overwriting the bitmap’s pixels.

void

copyPixelsToBuffer)(Buffer dst)

Copy the bitmap’s pixels into the specified buffer (allocated by the
caller).

static Bitmap

createBitmap)(Bitmap source,
int x, int y, int width, int
height, Matrix m,
boolean filter)

Returns an immutable bitmap from subset of the source bitmap,
transformed by the optional matrix.

static Bitmap

createBitmap)(int
width, int
height, Bitmap.Config config)

Returns a mutable bitmap with the specified width and height.

static Bitmap

createBitmap)(Bitmap source,
int x, int y, int width, int height)

Returns an immutable bitmap from the specified subset of the source
bitmap.

static Bitmap

createBitmap)(int[]
colors, int offset, int stride, int width, int
height, Bitmap.Config config)

Returns a immutable bitmap with the specified width and height, with
each pixel value set to the corresponding value in the colors array.

static Bitmap

createBitmap)(Bitmap src)

Returns an immutable bitmap from the source bitmap.

static Bitmap

createBitmap)(int[]
colors, int width, int
height, Bitmap.Config config)

Returns a immutable bitmap with the specified width and height, with
each pixel value set to the corresponding value in the colors array.

static Bitmap

createScaledBitmap)(Bitmap src,
int dstWidth, int dstHeight, boolean filter)

Creates a new bitmap, scaled from an existing bitmap.

int

describeContents)()

No special parcel contents.

void

eraseColor)(int
c)

Fills the bitmap’s pixels with the specified Color.

Bitmap

extractAlpha)()

Returns a new bitmap that captures the alpha values of the original.

Bitmap

extractAlpha)(Paint paint,
int[] offsetXY)

Returns a new bitmap that captures the alpha values of the original.

final Bitmap.Config

getConfig)()

If the bitmap’s internal config is in one of the public formats, return
that config, otherwise return null.

int

getDensity)()

Returns the density for this bitmap.

final int

getHeight)()

Returns the bitmap’s height

byte[]

getNinePatchChunk)()

Returns an optional array of private data, used by the UI system for
some bitmaps.

int

getPixel)(int
x, int y)

Returns the Color at the specified location.

void

getPixels)(int[]
pixels, int offset, int stride, int x, int y, int width, int height)

Returns in pixels[] a copy of the data in the bitmap.

final int

getRowBytes)()

Return the number of bytes between rows in the bitmap’s pixels.

int

getScaledHeight)(int
targetDensity)

Convenience method that returns the height of this bitmap divided by the
density scale factor.

int

getScaledHeight)(DisplayMetrics metrics)

Convenience for calling getScaledHeight(int) with the target density
of the given DisplayMetrics.

int

getScaledHeight)(Canvas canvas)

Convenience for calling getScaledHeight(int) with the target density
of the given Canvas.

int

getScaledWidth)(DisplayMetrics metrics)

Convenience for calling getScaledWidth(int) with the target density of
the given DisplayMetrics.

int

getScaledWidth)(int
targetDensity)

Convenience method that returns the width of this bitmap divided by the
density scale factor.

int

getScaledWidth)(Canvas canvas)

Convenience for calling getScaledWidth(int) with the target density of
the given Canvas.

final int

getWidth)()

Returns the bitmap’s width

final boolean

hasAlpha)()

Returns true if the bitmap’s config supports per-pixel alpha, and if the
pixels may contain non-opaque alpha values.

final boolean

isMutable)()

Returns true if the bitmap is marked as mutable (i.e.

final boolean

isRecycled)()

Returns true if this bitmap has been recycled.

void

prepareToDraw)()

Rebuilds any caches associated with the bitmap that are used for drawing
it.

void

recycle)()

Free up the memory associated with this bitmap’s pixels, and mark the
bitmap as “dead”, meaning it will throw an exception if getPixels() or
setPixels() is called, and will draw nothing.

void

setDensity)(int
density)

Specifies the density for this bitmap.

void

setPixel)(int
x, int y, int color)

Write the specified Color into the bitmap (assuming it is mutable) at
the x,y coordinate.

void

setPixels)(int[]
pixels, int offset, int stride, int x, int y, int width, int height)

Replace pixels in the bitmap with the colors in the array.

void

writeToParcel)(Parcel p,
int flags)

Write the bitmap and its pixels to the parcel.

这是我们实现截图图形的重要方法:

static Bitmap createBitmap(Bitmap source, int x, int y, int width, int height)

Returns an immutable bitmap from the specified subset of the source bitmap.

第一个參数source就是本来的Bitmap对象,后面的四个參数分别表示截取的范围。

2、另一种方法,不是随意截取图形。而是从图像的一端(上、下、左、右)截取图像。也能够使用图像截取资源,这样的资源须要在res/drawable文件夹中建立一个xml文件

<clip xmlns:android="http://schemas.android.com/apk/res/android"
    android:clipOrientation="horizontal"
    android:drawable="@drawable/ic_launcher"
    android:gravity="left" >
</clip>

然后我们能够通过ClipDrawable获取要截取的图像:

public class

 

HDC  hDCMem = ::CreateCompatibleDC(hDC); //创建兼容DC

gnome-web-photo截图

gnome-web-photo是命令行截图工具,那就得先安装喽。

  • 在debian/ubuntu下安装

➜  ~ sudo apt-get install gnome-web-photo -y
  • 在yum包管理发行版安装

➜  ~ sudo yum install gnome-web-photo -y
  • 开始截图了

gnome-web-photo -t 0 --mode=photo URL fileName.png 

注意:URL为你要截取网页的链接。

要是使用桌面LinuxPC呢,推荐使用Firefox,Firefox截图很高清,简单的分享!


Alic say :
****价值源于技术,贡献源于分享****

ClipDrawable

extends Drawable
implements Drawable.Callback

java.lang.Object

   

android.graphics.drawable.Drawable

 

   

android.graphics.drawable.ClipDrawable

公有方法

void

draw)(Canvas canvas)

Draw in its bounds (set via setBounds) respecting optional effects such
as alpha (set via setAlpha) and color filter (set via setColorFilter).

int

getChangingConfigurations)()

Return a mask of the configuration parameters for which this drawable
may change, requiring that it be re-created.

Drawable.ConstantState

getConstantState)()

int

getIntrinsicHeight)()

Return the intrinsic height of the underlying drawable object.

int

getIntrinsicWidth)()

Return the intrinsic width of the underlying drawable object.

int

getOpacity)()

Return the opacity/transparency of this Drawable.

boolean

getPadding)(Rect padding)

Return in padding the insets suggested by this Drawable for placing
content inside the drawable’s bounds.

void

inflate)(Resources r, XmlPullParser parser, AttributeSet attrs)

void

invalidateDrawable)(Drawable who)

Called when the drawable needs to be redrawn.

boolean

isStateful)()

Indicates whether this view will change its appearance based on state.

void

scheduleDrawable)(Drawable who, Runnable what,
long when)

A Drawable can call this to schedule the next frame of its animation.

void

setAlpha)(int
alpha)

Specify an alpha value for the drawable.

void

setColorFilter)(ColorFilter cf)

Specify an optional colorFilter for the drawable.

boolean

setVisible)(boolean
visible, boolean restart)

Set whether this Drawable is visible.

void

unscheduleDrawable)(Drawable who, Runnable what)

A Drawable can call this to unschedule an action previously scheduled
with scheduleDrawable(Drawable,
Runnable, long)
.

而我们通常所用的Drawable里面有一个方法:

  • The setLevel(int) method allows the client to supply a single
    continuous controller that can modify the Drawable is displayed,
    such as a battery level or progress level. Some drawables may modify
    their imagery based on the current level.

这就是设置截取比例的。

我测试的软件:

HBITMAP  hBitMap = ::CreateCompatibleBitmap(hDC, rect.right,
rect.bottom); //创建兼容位图

VS2008 没问题,

HBITMAP  hOldMap = ( HBITMAP )::SelectObject(hDCMem, hBitMap);
//将位图选入DC,并保存返回值

SQL2005 存在兼容性的问题

::BitBlt(hDCMem, 0, 0, rect.right, rect.bottom, hDC, 0, 0, SRCCOPY);
//将屏幕DC的图象复制到内存DC中

VS2008里面的Sql Express没问题

CImage image;

图片 1

image.Attach(hBitMap);

image.Save(_T( “c://YMDownloads//output.jpg”
));//如果文件后缀为.bmp,则保存为为bmp格式

image.Detach();

::SelectObject(hDCMem, hOldMap); //选入上次的返回值

//释放

::DeleteObject(hBitMap);

::DeleteDC(hDCMem);

::DeleteDC(hDC);

return TRUE;

}

发表评论

电子邮件地址不会被公开。 必填项已用*标注