• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:39
CEST 18:39
KST 01:39
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature3Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18Serral wins EWC 202549
Community News
Maestros of The Game—$20k event w/ live finals in Paris10Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195Weekly Cups (Jul 28-Aug 3): herO doubles up6
StarCraft 2
General
Geoff 'iNcontroL' Robinson has passed away RSL Revival patreon money discussion thread Weekly Cups (Aug 11-17): MaxPax triples again! What mix of new and old maps do you want in the next 1v1 ladder pool? (SC2) : I made a 5.0.12/5.0.13 replay fix
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris Master Swan Open (Global Bronze-Master 2) $5,100+ SEL Season 2 Championship (SC: Evo) Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series
Strategy
Custom Maps
External Content
Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below Mutation # 484 Magnetic Pull
Brood War
General
Maps with Neutral Command Centers Flash Announces (and Retracts) Hiatus From ASL [ASL20] Ro24 Preview Pt1: Runway How do the new Battle.net ranks translate? Victoria gamers
Tourneys
[Megathread] Daily Proleagues The Casual Games of the Week Thread [ASL20] Ro24 Group C [ASL20] Ro24 Group A
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting Muta micro map competition
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Stormgate/Frost Giant Megathread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread The Games Industry And ATVI
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
High temperatures on bridge(s) Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment"
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Breaking the Meta: Non-Stand…
TrAiDoS
INDEPENDIENTE LA CTM
XenOsky
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2868 users

[XNA] .gif importer/processor

Blogs > wo0py
Post a Reply
wo0py
Profile Blog Joined July 2006
Netherlands922 Posts
May 30 2010 19:34 GMT
#1
Dear liquidians,

Some of you must be fimiliar with programming. I have the following problem. I have to load gifs in XNA as Texture2D's. I know I need to create my own Content Importer and Processor. I don't need the animation that gif offers, i just want one image to use it as an texture.

Now i started with loading the gif information into an Image. But now i don't know how to create an Texture2D (or TextureContent) from an image.

This shouldn't be to hard. I hope some one has some idea how to reach this because i don't want to convert all those images.

We shouldnt recreate anger of the non-virtual world
fanta[Rn]
Profile Blog Joined October 2004
Japan2465 Posts
May 30 2010 23:10 GMT
#2
I can't really say about XNA, but this is what we're doing in OpenGL:

//build texture palce
glGenTextures(1, &cur.texture);
glBindTexture(GL_TEXTURE_2D, cur.texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);

glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_ARB, ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT), 0, GL_RGBA, GL_UNSIGNED_BYTE, ilGetData());

//bulid mipmaps
glGenerateMipmap(GL_TEXTURE_2D);
wo0py
Profile Blog Joined July 2006
Netherlands922 Posts
June 04 2010 21:12 GMT
#3
Hmm thanks for your post, but i don't think this works in XNA.
We shouldnt recreate anger of the non-virtual world
fanta[Rn]
Profile Blog Joined October 2004
Japan2465 Posts
Last Edited: 2010-06-04 21:50:42
June 04 2010 21:50 GMT
#4
sorry - -
still stuck on it? Im working on view frustum culling and am stuck since 2 days
Please log in or register to reply.
Live Events Refresh
Next event in 7h 21m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko619
SpeCial 211
ProTech29
MindelVK 28
JuggernautJason16
StarCraft: Brood War
Calm 5050
Bisu 3516
Shuttle 1887
Rain 1386
Flash 1314
Jaedong 1192
firebathero 741
EffOrt 685
ZerO 485
Soulkey 295
[ Show more ]
BeSt 266
ggaemo 259
Rush 181
hero 129
Hyuk 123
Mind 107
Barracks 79
Snow 75
Nal_rA 68
Hyun 60
[sc1f]eonzerg 52
sorry 46
JYJ40
TY 38
Aegong 32
zelot 29
Yoon 29
Terrorterran 19
Sacsri 19
scan(afreeca) 17
HiyA 13
ajuk12(nOOB) 8
IntoTheRainbow 8
Dota 2
Gorgc11285
syndereN553
XcaliburYe304
Counter-Strike
flusha185
Super Smash Bros
Westballz41
Other Games
gofns8734
FrodaN1135
hiko676
Mlord498
Beastyqt397
RotterdaM225
KnowMe205
Liquid`VortiX156
ArmadaUGS110
Trikslyr54
ZerO(Twitch)16
fpsfer 0
Organizations
StarCraft 2
angryscii 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• iHatsuTV 8
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV541
League of Legends
• Nemesis3071
• Jankos1179
• TFBlade516
Counter-Strike
• Shiphtur46
Upcoming Events
Replay Cast
7h 21m
LiuLi Cup
18h 21m
BSL Team Wars
1d 2h
Team Hawk vs Team Dewalt
Korean StarCraft League
1d 10h
CranKy Ducklings
1d 17h
SC Evo League
1d 19h
WardiTV Summer Champion…
1d 20h
Classic vs Percival
Spirit vs NightMare
CSO Cup
1d 23h
[BSL 2025] Weekly
2 days
Sparkling Tuna Cup
2 days
[ Show More ]
SC Evo League
2 days
BSL Team Wars
3 days
Team Bonyth vs Team Sziky
Afreeca Starleague
3 days
Queen vs HyuN
EffOrt vs Calm
Wardi Open
3 days
RotterdaM Event
3 days
Replay Cast
4 days
Afreeca Starleague
4 days
Rush vs TBD
Jaedong vs Mong
Afreeca Starleague
5 days
herO vs TBD
Royal vs Barracks
The PondCast
6 days
Liquipedia Results

Completed

Jiahua Invitational
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 1
SEL Season 2 Championship
WardiTV Summer 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSLAN 3
CSL Season 18: Qualifier 2
CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
Maestros of the Game
EC S1
Sisters' Call Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.