天道酬勤,学无止境

image

how to select a opened image with DLGCreateImagePopup in created dialog

I creat a dialog with DLGCreateImagePopup to select a opened image. But after I select the image, I cannot do anything for that image. How to get the image ID or name of the selected image?

2021-09-24 19:29:05    分类:问答    image   input   dialog   dm-script

Annotate DOT graphs with images

I'm using PyDot to generate Graphviz/dot graphs in python. I would like to annotate my nodes and edges with images read from files, I've found in the documentation how to put an image as a node, but not how to put an image under a node or even less an edge. http://www.graphviz.org/doc/info/attrs.html http://www.graphviz.org/doc/info/shapes.html http://www.graphviz.org/Documentation/html/shapehowto.html Does anybody know how to do that?

2021-09-24 18:25:26    分类:问答    image   graphviz   dot   edges

Saving a photo with a name, or any kind of metadata

I've got a completed app that takes photos and puts them in custom albums. I can name each album and I can retrieve all the images perfectly. However what I really need is to be able to name the individual photos (or use some kind of metadata) so that I can show them at appropriate times inside the app. I know it can be done if you are storing the photos in the app's documents directory but I've had to move away from that and go with the device's photo library. Has anyone got any ideas around how to do this? PS. I am using Objective-C not SWIFT.

2021-09-24 14:04:43    分类:问答    ios   objective-c   image   metadata

Show and hide images with next previous button using Javascript

I have four divs, each div contain images and contents. one next and previous button. at a time only div will show. on click of next the second div have to be shown and first will hide. same upto fourth div. Need to use pure Javascript. No jquery or javascript plugins is allowed.... :(. Can anyone help me to do this?. Thanks! My html Code: <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div id="container"> <div id="theProduct"> <div id="slides"> <a href="#" class="prev"><img src="img/prev.jpg" width="29"

2021-09-24 10:14:48    分类:问答    javascript   html   css   image   gallery

java images with alpha channel without using buffered image

im drawing a bunch of tiles on a Canvas, these tiles are represented by either Images or BufferedImages. i noticed that im getting millisecond draws with Images but what i start using BufferedImages for the tiles the frame time sky rockets to above 20ms. BufferedImage buffered = ImageIO.read(new File(fileName)); Image image = Toolkit.getDefaultToolkit().createImage(fileName); Both of these images support alpha channels. I would like to start using alpha capable Image's for intermediary buffers. However i havent found a place in the jdk that can generate them besides this Toolkit call to create

2021-09-24 09:18:14    分类:问答    java   image   alpha

我们如何在 Android 中调整图像大小?(How do we resize images in Android?)

问题 我一直在环顾四周,找不到对此的肯定答案。 对于图像,我们是使用硬编码的 dp 作为布局宽度和高度还是使用 wrap_content? 例如,假设我有一个带有图标作为图像的图像视图。 如果我使用 wrap_content,图像太大,并且无法调整其大小(图像是使用 xxhdpi 制作的)。 如果我手动设置了 dp,那么如果它的屏幕更大,图像就不会随着设备缩放(或者它是否如此,我不确定它是否仍然如此?)。 我想知道我们应该遵循的工作流程,我已经阅读了所有文档,但在缩放图像方面很模糊。 我有各种屏幕尺寸(hdpi、mdpi 等)的图像。 问题 如果我对宽度和高度进行了硬编码,android 是否仍将这些图像(hdpi、mdpi 等)用于不同的屏幕尺寸? 硬编码宽度和高度是否不好,如果是这样,调整图像大小的替代方法是什么? 如果我们硬编码每个屏幕分辨率的大小会怎样? 例如,当硬编码图像的宽度和高度时,我会使用 200dp x 200dp 的平板电脑和 100dp x 100dp 的手机。 这是一个好方法吗? 处理图像时要遵循的最佳工作流程是什么? 我应该为每个屏幕分辨率创建不同大小的图像吗? 我应该使用一张大图像,然后对每个布局的大小进行硬编码吗? 是否有网站或程序可以提供图像并自动提供各种屏幕密度图像? 例如,我上传一张图片,它会为我提供 mdpi、hdpi、hdpix 等图片。

2021-09-24 07:57:58    分类:技术分享    android   image

Android Photography App Double Exposure

I would like to create an android app that would combine two photographs together to create something similar to what you would see in a double exposure photograph. Can you give me any ideas on how to do this?

2021-09-24 07:39:44    分类:问答    android   image   graphics   photography

Stop page jumping while images load

I'm building a CSS grid layout in PHP/HTML5 for displaying mainly images with text and sometimes in combination with videos (not used in this example). One thing still annoys me is the page jumping while images are loading. To avoid that the img tag should know either threw CSS or otherwise what the ratio is beforehand, most of the images used have a 1:1,414 ratio but there are exceptions so using just one ratio wouldn't work. Adding width and height on each img tag didn't work either. I'm using a base64 transparent gif so it has something to load before the real image is downloaded. In the

2021-09-24 07:38:24    分类:问答    html   css   image   grid-layout

如何在 OpenCV 中创建自定义调色板的颜色直方图?(How do I create a colour histogram of a custom colour palette in OpenCV?)

问题 我有一个图像: 并且图像中的颜色范围是通过这些 RGB 值作为线性插值生成的: rgb = [165,0,38], w = 0.0 rgb = [222,63,46], w = 0.125 rgb = [248,142,82], w = 0.25 rgb = [253,212,129], ... rgb = [254,254,189] rgb = [203,232,129] rgb = [132,202,102] rgb = [42,159,84] rgb = [0,104,55], w = 1.0 如何创建图形/直方图,其中 x 轴是颜色范围,值是具有该像素颜色的图像的百分比。 回答1 这是我如何解决这个问题的蛮力尝试。 请注意,我正在寻找 RGB 空间中的色距,但众所周知,RGB 中的色距并不能很好地模仿人类对颜色的感知……但这可以帮助您入门。 请注意,您需要安装 numpy 和 matplotlib。 matplotlib允许将直方图绘制为茎图。 基本上,您定义的那些 RGB 值我们可以视为关键点。 从这里开始,我们需要定义直方图中需要计算的 bin 总数。 我将其设置为 64 开始。 您首先需要做的是为您定义的那些值插入红色、绿色和蓝色值,以便我们可以创建一个 RGB 查找表。 因此,我们需要使用您定义的那些关键点从开始的 RGB 元组到结束的 RGB 元组生成 64

2021-09-24 07:28:45    分类:技术分享    python   image   opencv   image-processing

如何在 Java 3D API 中将不同的图像设置为 3D 立方体的面/侧面?(How to set different images as faces/sides of a 3D cube in Java 3D API?)

问题 我创建了一小段代码,它在我的 SWT 应用程序中绘制了一个 3D 立方体,允许旋转它。 现在,我想更改立方体的每个面/侧面并在其上绘制不同的图像,但我找不到方法(或者至少,如果可能的话,以一种简单的方式)。 我能够将立方体的完整纹理更改为图像,但它更改了所有面,我想为每个面设置不同的图像。 这可能吗? 任何代码示例? 谢谢 回答1 使用 TextureCubeMap 类,它是 Texture 的子类。 纹理映射可用于将图像应用于立方体的面。 您可以通过使用 xyz 坐标将立方体面指定为正和负来实现。 有关其完整文档,请参阅以下链接。 回答2 好的,基于之前的答案和其他一些论坛,我得到了以下代码,允许为立方体的每个面设置不同的纹理: 基本上允许这样做的行如下: ((Shape3D) textureCube.getChild(POSITION)).setAppearance(APPEARANCE); 考虑到: 纹理立方体: Box textureCube = new Box(0.4f, 0.4f, 0.4f, Box.GENERATE_TEXTURE_COORDS, defaultAppearance); (defaultAppearance 只是一个基本的 Appearance 对象:Appearance defaultAppearance = new Appearance()

2021-09-24 07:17:19    分类:技术分享    java   image   3d   geometry