Duilib扩展—扩展GIF显示

网易duilib界面库 网易duilib的源码目录结构 阅读详情
在用duilib实际开发应用中,有时需要显示一些动态的图片,比如loading加载之类的。而duilib中负责对图片载入相关处理的stb_image.c对这块没有提供很好的支持,所以需要我们自行进行相关扩展。而对于动态图片效果,我们可以根据实际应用场景分两种:

一. loading加载

loading等待状态的图片效果,对于这类比较简单的情况,实际上不需要额外对duilib进行相关扩展。我们只需要将准备好几张一个loading图片在不同位置状态下的几张图片。然后设置Timer进行背景替换即可。

二. GIF动画图片

对于一些复杂一点的动画图片,如果用上述设置Timer替换的方式显然不太方便。这种情况下,我们就需要对duilib进行相关扩展。
动态gif简单的理解为:gif文件是由多张普通的bmp图片组成,显示第1张BMP,延时一段时间,显示第二张,延时一段时间,显示第3张...
Duilib ListUI功能增强源码 Duilib是一个基于C++编写的UI库,它广泛应用于Windows应用程序的开发中,尤其是那些需要快速搭建用户界面的应用程序。它提供了一种简洁的方式来创建复杂的用户界面,而无需深入复杂的Win32 API编程。ListUI是Duilib库中的一个核心组件,它专注于处理列表的视图和数据管理。在图形用户界面(GUI)设计中,布局是指控件(如按钮、文本框、图像等)在窗口中的空间分布。良好的布局可以提高用户界面的可用性和美观性。布局通常涉及以下几个核心概念:容器。 阅读详情

相关推荐

duilib学习

duilib界面开发学习

DuiLib界面库,开源的界面开发库--DuiLib,包含源代码及示例工程。

开源的界面开发库--DuiLib,包含源代码及示例工程。

一个简单易用的图像库:stb_image

一个简单易用的图像库:stb_image 。Github 地址为:https://github.com/nothings/stb ,目前已经有了 9600+ Star (18000+)。它的使用非常简单,看看 README 可能你就会了。 看看它的源码,你会发现全是 .h 头文件。这就是它的强大之处了,仅需在工程中加入头文件就可以解析图像了(实际上是函数实现等内容都放在头文件了而已)。

duilib 显示gif图片

duilib 显示gif 动态图片,里面包含源码。

Duilib实现加载gif图

Duilib实现加载gif图,在stb_image.c中增加一个加载动态gif的函数TGifInfo*gif_load_from_memory().

OpenCV 开闭运算

开运算和闭运算是将腐蚀和膨胀按照一定的次序进行处理。 但这两者并不是可逆的,即先开后闭并不能得到原来的图像。 开运算 开运算是先腐蚀后膨胀,其作用是:分离物体,消除小区域。特点:消除噪点,去除小的干扰块,而不影响原来的图像。 闭运算 闭运算与开运算相反,是先膨胀后腐蚀,作用是消除/“闭合”物体里面的孔洞,特点:可以填充闭合区域。 cv.morphologyEx(img, op, kernel) img: 要处理的图像 op: 处理方式:若进行开运算,则设为cv.MORPH_OPEN,若进行闭

꧁༺ʚvv༒catɞ༻꧂的博客 956

基于物联网技术智慧园林绿化养护管理信息平台

近几年来,随着经济不断的发展,城市面积不断的扩大,城市管理中的园林绿化工作也在这种趋势下不断的发生着深刻改变。管养企业是否按制定的管养计划严格执行?绿化事件整改是否及时到位?绿地面积是否在稳步增长?管养的效果如何?如何客观评价管养企业的管养工作?这些都是我们各级管理者需要面对的问题。   智慧园林绿化养护管理信息平台的开发思路以“考核”为核心,整个信息平台体现出“新、快、高、全、享”五个特点。   智慧园林绿化养护管理信息平台的整个开发理念为:依托五大技术手段(全球卫星定位系统技术、地理信...

Cesium的博客QQ2252224326 2465

保姆级教程:在RK3588开发板上编译带MPP硬件加速的FFmpeg(含完整依赖库配置)

本文提供在RK3588开发板上编译支持MPP硬件加速的FFmpeg的详细教程,涵盖交叉编译环境搭建、MPP框架及依赖库配置,最终实现4K视频硬件编解码性能优化。通过实战步骤和性能对比,展示如何充分发挥RK3588的硬件加速能力。

weixin_30839881的博客 426

PD3.0详解 协议的时序timer和counter计数

前面介绍了关于PD协议的交互,还有协议层数据各个字段的含义,但是一直没有系统的说关于协议的时序,还有部分counter,就是协议允许发送的次数,或者一些其他计数。 大师匈今天说一下关于这方面的东西,这些东西都是非常关键的东西,但是相对来说PD标准内对时序的要求还是比较宽泛,非常容易能够实现这样的要求。 Timer 1、CRCReceiveTimer 0.9~1.1ms 表示每次通信收到goodcrc的时间,必须在这个时间内收到goodcrc, 我们要注意不是在0.9~1.1ms内,而是第三方可以在这个范

大师匈的博客 5019

华为OD面试手撕真题目录

2026最新华为OD面试手撕真题 , 提供Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解.

qq_45776114的博客 1万+

【即插即用模块】卷积篇 | CVPR 2024 | InceptionDWConv,可替代ViT的自注意力部分,保持性能的同时提高效率!

InceptionDWConv模块是一种高效的多分支深度卷积设计,通过将大核卷积分解为3×3方形核、1×11/11×1条带核和恒等映射四个并行分支,在保持大感受野的同时显著降低计算成本。该模块适用于需要高效大范围感知的视觉任务,可替代Transformer中的自注意力机制。实验表明,其计算复杂度优于标准卷积和深度可分离卷积,在准确率和效率上均超越Swin、ResNet和ConvNeXt等模型。模块实现为即插即用结构,输入输出维度一致,适合作为Token Mixer使用。完整代码展示了多分支特征提取和通道拼接

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 1338

【人工智能】AI 智能体驾驭工程(Harness Engineering)全解析

OpenAI将Harness定义为让Agent能完成有用工作的系统工程,Harness Engineering则是持续设计、实现、迭代这套系统的方法论;Anthropic将其概括为「让模型真正成为可靠Agent的基础设施」;Martin Fowler/Thoughtworks则将其定义为「控制Agent各层循环的规格、质量检查与工作流指导体系」。强大的AI模型是一匹爆发力极强的烈马;Prompt Engineering是「对马喊话的技巧」,Context Engineering是「给马看的地图」;

奶爸的编程之路,也就一周冷个三天 5299

视觉Transformer实战 | Vision Transformer(ViT)详解与实现

在计算机视觉领域,卷积神经网络 (CNN) 长期以来一直是处理图像任务的主流架构。然而,随着 Transformer 在自然语言处理领域的巨大成功,研究人员开始探索将这种基于自注意力机制的架构应用于视觉任务。Vision Transformer (ViT) 是这一探索的重要里程碑,它首次证明了纯 Transformer 架构在图像分类任务上可以超越最先进的 CNN 模型。本文将详细介绍 ViT 的技术原理,并使用 PyTorch 从零开始构建 ViT 模型用于图像分类任务。

盼小辉丶的博客 4万+

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

上一篇: Duilib扩展—双击、右键消息扩展
下一篇: C++基础<02>—变量和基本类型
7-sevens
博客等级 码龄11年 259粉丝 68原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址