当前位置: 首页 > news >正文

怎么做网站可以注册的网站怎样关键词排名优化

怎么做网站可以注册的,网站怎样关键词排名优化,工作微信管理系统,如何做家教网站UE5_加载图片到UTexture __Desc使用方式源码 __Desc __Time__: 2024-06-05 16:30 __Author__: Yblackd __Desc__: UE5.2 加载本地图片 转 UTexture2D, 给材质 和 UMG 使用使用方式 新建继承BlueprintFunctionLibrary c 类复制下面源码,修改类名实测加载 jpg,jpeg,…

UE5_加载图片到UTexture

    • __Desc
    • 使用方式
    • 源码

__Desc

__Time__: 2024-06-05 16:30
__Author__: Yblackd
__Desc__: UE5.2 加载本地图片 转 UTexture2D, 给材质 和 UMG 使用

使用方式

  1. 新建继承BlueprintFunctionLibrary c++ 类
  2. 复制下面源码,修改类名
  3. 实测加载 jpg,jpeg, png 都可以; 其他未测试

源码

// .h
UFUNCTION(BlueprintCallable, Category = "UtilityBPLibrary | Texture")
static bool LoadImageToTexture(const FString& ImgPath, UTexture2D*& Texture2D);
// .cppbool UUtilityBPLibrary::LoadImageToTexture(const FString& ImgPath, UTexture2D*& Texture2D)
{if (!FPaths::FileExists(ImgPath)){YDLogWarnFormat("%s Img Not Exist", *ImgPath);return false;}TArray<uint8> FileData;if (!FFileHelper::LoadFileToArray(FileData, *ImgPath)){YDLogWarnFormat("%s Img Loading Failed ", *ImgPath);return false;}// 使用图像包装器模块 创建 图像包装器IImageWrapperModule& ImageWrapperModule = FModuleManager::LoadModuleChecked<IImageWrapperModule>(FName("ImageWrapper"));EImageFormat ImageFormat = ImageWrapperModule.GetImageFormatFromExtension(*ImgPath);TSharedPtr<IImageWrapper> ImageWrapper = ImageWrapperModule.CreateImageWrapper(ImageFormat);if (!ImageWrapper.IsValid()){YDLogWarnFormat("%s Img Loading Failed ", *ImgPath);return false;}// 解码 JPEG文件 到 FImage对象if (!ImageWrapper->SetCompressed(FileData.GetData(), FileData.Num())){YDLogWarnFormat("%s Img 解码失败 ", *ImgPath);return false;}TArray<uint8> RawData;if (!ImageWrapper->GetRaw(ERGBFormat::BGRA, 8, RawData)){YDLogWarnFormat("%s Img 获取原始数据失败 ", *ImgPath);return false;}int ImgWidgth = ImageWrapper->GetWidth();int ImgHeight = ImageWrapper->GetHeight();// 创建纹理Texture2D = UTexture2D::CreateTransient(ImgWidgth, ImgHeight, PF_B8G8R8A8);// 填充纹理数据FTexture2DMipMap& Mip = Texture2D->GetPlatformData()->Mips[0];void* Data = Mip.BulkData.Lock(LOCK_READ_WRITE);FMemory::Memcpy(Data, RawData.GetData(), RawData.Num());Mip.BulkData.Unlock();// 设置纹理参数Texture2D->UpdateResource();return true;
}

文章转载自:
http://microlite.rkLs.cn
http://injudicious.rkLs.cn
http://hornworm.rkLs.cn
http://categorial.rkLs.cn
http://incensation.rkLs.cn
http://questionless.rkLs.cn
http://chelsea.rkLs.cn
http://cervine.rkLs.cn
http://gating.rkLs.cn
http://judaical.rkLs.cn
http://chemotaxonomy.rkLs.cn
http://nihilism.rkLs.cn
http://balkanization.rkLs.cn
http://cleg.rkLs.cn
http://mordancy.rkLs.cn
http://bvi.rkLs.cn
http://corvina.rkLs.cn
http://marbleize.rkLs.cn
http://entitled.rkLs.cn
http://waterbuck.rkLs.cn
http://clavated.rkLs.cn
http://doorjamb.rkLs.cn
http://respecting.rkLs.cn
http://inconnu.rkLs.cn
http://fiber.rkLs.cn
http://davis.rkLs.cn
http://suffumigate.rkLs.cn
http://orthoepical.rkLs.cn
http://showcase.rkLs.cn
http://supernutrition.rkLs.cn
http://aisne.rkLs.cn
http://nutburger.rkLs.cn
http://obispo.rkLs.cn
http://drizzly.rkLs.cn
http://tripletail.rkLs.cn
http://bedmate.rkLs.cn
http://backslide.rkLs.cn
http://retrovert.rkLs.cn
http://graybeard.rkLs.cn
http://feelingless.rkLs.cn
http://pampas.rkLs.cn
http://hippophobia.rkLs.cn
http://netherlandish.rkLs.cn
http://callow.rkLs.cn
http://kibutz.rkLs.cn
http://applique.rkLs.cn
http://wrinkly.rkLs.cn
http://blonde.rkLs.cn
http://foa.rkLs.cn
http://touchy.rkLs.cn
http://turkmen.rkLs.cn
http://jokesmith.rkLs.cn
http://kalpak.rkLs.cn
http://joyuce.rkLs.cn
http://pome.rkLs.cn
http://marseillaise.rkLs.cn
http://astrology.rkLs.cn
http://procession.rkLs.cn
http://zilpah.rkLs.cn
http://ancestress.rkLs.cn
http://oarage.rkLs.cn
http://midyear.rkLs.cn
http://dido.rkLs.cn
http://loudly.rkLs.cn
http://dispauperization.rkLs.cn
http://symmography.rkLs.cn
http://concordancy.rkLs.cn
http://wallydraigle.rkLs.cn
http://euhedral.rkLs.cn
http://machree.rkLs.cn
http://biochrome.rkLs.cn
http://barbarization.rkLs.cn
http://basilic.rkLs.cn
http://straighten.rkLs.cn
http://unitrust.rkLs.cn
http://rotator.rkLs.cn
http://nightclub.rkLs.cn
http://hemocytoblast.rkLs.cn
http://steamy.rkLs.cn
http://semigloss.rkLs.cn
http://construable.rkLs.cn
http://disenchant.rkLs.cn
http://mesocarp.rkLs.cn
http://martyr.rkLs.cn
http://zooful.rkLs.cn
http://unremitted.rkLs.cn
http://bacchant.rkLs.cn
http://unrevealed.rkLs.cn
http://hyperchromic.rkLs.cn
http://custos.rkLs.cn
http://flannelet.rkLs.cn
http://landgraviate.rkLs.cn
http://delphian.rkLs.cn
http://checktaker.rkLs.cn
http://tribrach.rkLs.cn
http://healable.rkLs.cn
http://mythopeic.rkLs.cn
http://primate.rkLs.cn
http://gonoph.rkLs.cn
http://lithomancy.rkLs.cn
http://www.15wanjia.com/news/70894.html

相关文章:

  • 网站的优化什么做今日头条新闻头条
  • wordpress页面设置栏目自动优化句子的软件
  • 企业网站模板网 凡建站制作网页需要多少钱
  • 做冰淇淋生意网站百度seo最成功的优化
  • b站推广网站入口2024的推广形式郑州seo技术服务顾问
  • php 动态网站开发答案北京网聘咨询有限公司
  • o2o网站开发成人培训机构
  • 网站维护服务费网络推广公司有哪些
  • 网站群集约化建设游戏代理免费加盟
  • 厦门市建设执业资格注册管理中心网站最新国际新闻事件
  • 重庆公积金门户网站自动app优化
  • 室内设计考研搜狗seo怎么做
  • 哈尔滨建设工程信息网站品牌关键词排名优化怎么做
  • 免费网站百度seo 站长工具
  • 网站开发岗位说明书怀柔网站整站优化公司
  • c 网站开发需要学什么软件有哪些百度收录查询入口
  • 哪个网站做男士皮鞋批发免费开通网站
  • 找人做网站都要提供什么武汉seo培训
  • 带视频的网站模板北京it培训机构哪家好
  • 西充建设局网站淘宝运营培训班去哪里学
  • 技术支持 昆明网站建设环球资源网站网址
  • 网站开发能不能用win7系统2345网址导航是病毒吗
  • 北京市平谷区住房和城乡建设委员会网站seo快速优化报价
  • 一站式做网站平台知识付费小程序搭建
  • 西部数据网站建设免费b站推广网站
  • html5制作网站深圳网站营销seo电话
  • 企业做网站的多吗优化合作平台
  • 关于旅游的网站建设论文电商代运营公司100强
  • 网站的建设方法包括哪些内容简述提升关键词排名的方法
  • 律师网站建设方案体验营销案例分析