标签: imagelist

如何从VS2005中的图像列表导出图像?

使用Visual Studio 2005,有没有办法将图像列表中的图像导出到PC上的单个文件?使用IDE,我选择图像列表并查看其属性.在"Images"属性中,我启动了Images Collection Editor对话框.我只能添加和删除图像,但我找不到导出列表中已有图像的方法.

为什么?制作原始列表的开发人员离开了我们公司,我需要ASP.NET应用程序的图像(将转换为.jpeg).

感谢您的帮助!

.net imagelist

11
推荐指数
1
解决办法
8671
查看次数

如何使用imageList控件

我有一些图像,我手动添加到imageList Cotrol.现在我需要从imageList中删除thart图像,具体取决于键索引并设置为面板背景.

我该怎么办

.net c# imagelist winforms

8
推荐指数
1
解决办法
7万
查看次数

TreeView节点的图像索引在选择时发生变化

当我尝试在树视图中使用图像列表时,单击treenode时图像索引会发生变化.我不知道为什么会这样.谁能帮我?

提前致谢

.net c# treeview imagelist

7
推荐指数
2
解决办法
1万
查看次数

使用VB6应用程序中的ImageList会导致Windows 7.0 64位崩溃

我有一个旧的VB6应用程序,它使用COMCTL32.OCX("Microsoft Windows公共控件5.0(SP2)")中的ImageList控件来为TreeViews和ListViews提供图标.

该应用程序甚至不会在Windows 7.0 64位上启动.它试图加载具有ImageList的表单的那一刻,就崩溃了(实际上,应用程序眨了眨眼,没有跟踪就退出了).

从表单中删除ImageList可以解决问题.

有任何想法吗?

vb6 treeview listview win64 imagelist

6
推荐指数
1
解决办法
6322
查看次数

Delphi - 在运行时使用图标填充图像列表'破坏'透明度

我花了几个小时来完成这个(简单的)并且找不到解决方案:/

我正在使用D7和TImageList.ImageList被分配给工具栏.当我在设计时填充ImageList时,图标(具有部分透明度)看起来很好.但我需要在运行时填充它,当我这样做时,图标看起来很糟糕 - 完全松散了部分透明度.

我只是尝试从.res文件中加载图标 - 结果相同.我尝试过第三方图像列表也没有成功.我不知道我能做什么:/谢谢2所有;)

编辑:

说实话,我不知道到底发生了什么.Alpha混合是相关术语......这里有两个屏幕:

在设计时添加的图标: 替代文字http://shs-it.de/tmp/icon-designtime.JPG

在运行时添加的图标: 替代文字http://shs-it.de/tmp/icon-runtime.JPG

您不支持Alpha混合的评论带来了解决方案:我在编辑器中编辑了图像并删除了"alpha混合"像素 - 现在它看起来很好.但是,在运行时添加图标而不是设计时,图标看起来仍然很奇怪.如果你(或其他人)可以解释它,我会很高兴;)感谢您的支持!

delphi icons imagelist

6
推荐指数
2
解决办法
6176
查看次数

ImageList:32位图像质量下降

我使用ImageListTreeViewListView.我首先将图像质量设置为32位,然后添加半透明图像.质量看起来不错,但在编写,编译和执行应用程序几分钟后,质量看起来很糟糕.

看截图: 在此输入图像描述

使用过的属性

ColorDepth: Depth32Bit
ImageSize: 16; 16
TransparentColor: Transparent
Run Code Online (Sandbox Code Playgroud)

像素背后有黑色像素,半透明但不完全透明.

重新添加所有图像会恢复原始质量,但几分钟后,它就会显示在屏幕截图的右侧.

c# graphics imagelist winforms

6
推荐指数
1
解决办法
5685
查看次数

将32位Bitmap添加到ImageList

我正在尝试在运行时创建并绘制一个32位位图,然后将其添加到ImageList.位图具有透明度(alpha通道).我可以创建位图并在它的Canvas上绘制没有任何问题,并且它在任何其他画布上都具有透明度.

问题是当我将它添加到ImageList时,图像似乎丢失了使用位图的Canvas属性制作的图形.

以下是我启动Bitmap的方法:

Bitmap := TBitmap.Create;
Bitmap.PixelFormat := pf32bit;
Bitmap.Transparent := True;
Bitmap.AlphaFormat := afDefined;
SetBkMode(Bitmap.Canvas.Handle, TRANSPARENT);
Bitmap.SetSize(100, 42);

// now I can draw, let's say, an icon from an imagelist
ImageList.Draw(Bitmap.Canvas, 5, 5, 0, dsTransparent, itImage);

// and some other stuff
Bitmap.Canvas.RoundRect(0, 0, 99, 41, 5, 5);
Bitmap.Canvas.TextOut(50, 5, 'Test string');
Run Code Online (Sandbox Code Playgroud)

如果我将此Bitmap绘制到任何控件画布,它会使用图像列表中的图像,圆角矩形和文本,使用透明背景(任何未绘制的任何内容都是透明的;将保留已存在的背景)进行正常绘制.这意味着Form1.Canvas.Draw(0, 0, Bitmap);将在Form1上绘制位图,如果那里有任何其他图像,它将保留为背景.

但是,如果我将此位图添加到图像列表,则会出现奇怪的问题.ImageList将ColorDepth设置为cd32bit,然后调用:

BitmapImageList.Width := Bitmap.Width;
BitmapImageList.Hieght := Bitmap.Height;
BitmapImageList.Add(Bitmap, nil);
Run Code Online (Sandbox Code Playgroud)

现在,如果我尝试从图像列表中绘制该图像:

BitmapImageList.Draw(Form1.Canvas, 0, 0, 0);
Run Code Online (Sandbox Code Playgroud)

将显示的唯一内容是从ImageList在Bitmap中绘制的图像,圆角矩形和在Canvas中绘制的文本消失.

我错过了什么?

delphi transparency bitmap imagelist

6
推荐指数
1
解决办法
3476
查看次数

如何在flutter中使用precacheImage函数?

无法使用precacheImage函数将本地图像从资产加载并缓存到 flutter 中的 GridView 或 ListView。

问题:滚动列表时,图像总是重新加载。

class AppLandingPage extends StatelessWidget {
  final String title;

  AppLandingPage({Key key, this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        drawer: DrawerPage(),
        body: NestedScrollView(
          headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
            return getToolbarWidget("Home title");
          },
          body: setDataToContainer(),
        ));
  }
}

Container setDataToContainer() {
  return Container(
    color: Colors.white,
    margin: EdgeInsets.only(left: 4.0, right: 4, bottom: 4, top: 4),
    child: CustomScrollView(
      slivers: <Widget>[
        SliverList(
          delegate: SliverChildListDelegate(
            [
              HeaderWidget("Header 1"),
            ],
          ),
        ),
        SliverGrid(
          gridDelegate: …
Run Code Online (Sandbox Code Playgroud)

caching imagelist flutter flutter-sliver flutter-layout

6
推荐指数
1
解决办法
6597
查看次数

处理 ImageList

处理ImageList对象的适当方法是什么?

假设我有一个private ImageList imageList成员的类。现在,有时我会执行以下代码:

// Basically, lazy initialization.
if (imageList == null)
{
    imageList = new ImageList();
    Image[] images = Provider.CreateImages(...);
    foreach (var image in images)
    {
        // Does the 'ImageList' perform implicit copying here
        // or does it aggregate a reference?
        imageList.Images.Add(image); 

        // Do I need to do this?
        //image.Dispose();
    }
}

return imageList;
Run Code Online (Sandbox Code Playgroud)

在同一个类中,我有Dispose方法实现,其执行方式如下:

public void Dispose()
{
    if (!disposed)
    {
        // Is this enough?
        if (imageList != null)
            imageList.Dispose();

        disposed = …
Run Code Online (Sandbox Code Playgroud)

c# idisposable imagelist winforms

5
推荐指数
1
解决办法
3211
查看次数

通过图像列表显示时图像质量下降

我想ImageList使用计时器循环显示图像。它工作正常,除了PictureBoxPictureBox它应该显示图像列表中的图片时,在a上生动显示的相同图像会失去其质量。

直接显示时的图像PictureBox

在此处输入图片说明

显示在PictureBox但通过ImageList( pictureBox1.Image = imglist.Images[0];) 时的图像:

在此处输入图片说明

我的图片是一个128x128png,这里是我PictureBox和我的设计器代码ImageList

// 
// pictureBox1
// 
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(378, 78);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;

// 
// imglist
// 
this.imglist.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imglist.ImageStream")));
this.imglist.TransparentColor = System.Drawing.Color.Transparent;
this.imglist.Images.SetKeyName(0, "1423093311_supportfemale-48.png");
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

c# image imagelist picturebox winforms

5
推荐指数
1
解决办法
773
查看次数