PageSourceSearch

https://www.codeandweb.com/component---src-templates-knowledgebase…rt-image-format-mdx-fe4b176322d98d98a820.js

js codeandweb.com collected 2026-09-24 19:38:37 UTC 14,944 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkcodeandweb=self.webpackChunkcodeandweb||[]).push([[28818],{3607:function(e,t,l){var n=l(82839).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},8660:function(e,t,l){l.r(t),l.d(t,{Head:function(){return x},default:function(){return h}});var n=l(28453),r=l(96540);function a(e){const t=Object.assign({p:"p",code:"code",pre:"pre",em:"em",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",a:"a"},(0,n.R)(),e.components);return r.createElement(r.Fragment,null,r.createElement(t.p,null,"With TexturePacker's ",r.createElement(t.code,null,"--convert-texture")," command line option you can easily convert a single image to a different format:"),"\n",r.createElement(t.pre,null,r.createElement(t.code,{className:"language-bash"},"TexturePacker --convert-texture input.png --pixel-format ASTC_6x6 --texture-format ktx\n")),"\n",r.createElement(t.p,null,"The ",r.createElement(t.em,null,"pixel format")," specifies the compression algorithm to use, the ",r.createElement(t.em,null,"texture format")," describes the file container.\nThe following formats are supported for ASTC compression:"),"\n",r.createElement(t.table,null,r.createElement(t.thead,null,r.createElement(t.tr,null,r.createElement(t.th,null,"Pixel format"),r.createElement(t.th,{align:"right"},"Bits per pixel"),r.createElement(t.th,{align:"left"},"Description"))),r.createElement(t.tbody,null,r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_4x4")),r.createElement(t.td,{align:"right"},"8.00"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 4x4")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_5x4")),r.createElement(t.td,{align:"right"},"6.40"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 5x4")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_5x5")),r.createElement(t.td,{align:"right"},"5.12"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 5x5")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_6x5")),r.createElement(t.td,{align:"right"},"4.27"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 6x5")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_6x6")),r.createElement(t.td,{align:"right"},"3.56"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 6x6")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_8x5")),r.createElement(t.td,{align:"right"},"3.20"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 8x5")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_8x6")),r.createElement(t.td,{align:"right"},"2.67"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 8x6")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_8x8")),r.createElement(t.td,{align:"right"},"2.00"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 8x8")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_10x5")),r.createElement(t.td,{align:"right"},"2.56"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 10x5")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_10x6")),r.createElement(t.td,{align:"right"},"2.13"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 10x6")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_10x8")),r.createElement(t.td,{align:"right"},"1.60"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 10x8")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_10x10")),r.createElement(t.td,{align:"right"},"1.28"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 10x10")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_12x10")),r.createElement(t.td,{align:"right"},"1.07"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 12x10")),r.createElement(t.tr,null,r.createElement(t.td,null,r.createElement(t.code,null,"ASTC_12x12")),r.createElement(t.td,{align:"right"},"0.89"),r.createElement(t.td,{align:"left"},"Compressed with ASTC 12x12")))),"\n",r.createElement(t.table,null,r.createElement(t.thead,null,r.createElement(t.tr,null,r.createElement(t.th,{align:"left"},"Texture Format"),r.createElement(t.th,{align:"left"}
1,"Description"))),r.createElement(t.tbody,null,r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"astc")),r.createElement(t.td,{align:"left"},"ASTC texture file. Direct container for ASTC compressed data.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"ktx")),r.createElement(t.td,{align:"left"},"Khronos Texture. Standard container for OpenGL ES textures.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"ktx2")),r.createElement(t.td,{align:"left"},"Khronos Texture (Version 2). Newer format with Basis Universal support.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"zktx")),r.createElement(t.td,{align:"left"},"Khronos Texture (gzip compressed). KTX file compressed for smaller storage.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"pvr3")),r.createElement(t.td,{align:"left"},"PowerVR Texture Format. Native format for iOS and PowerVR GPUs.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"pvr3gz")),r.createElement(t.td,{align:"left"},"PowerVR Texture Format, compressed with gzip. Smaller on disk, decompressed at load time.")),r.createElement(t.tr,null,r.createElement(t.td,{align:"left"},r.createElement(t.code,null,"pvr3ccz")),r.createElement(t.td,{align:"left"},"PowerVR Texture Format, compressed with zlib, cocos2d header.")))),"\n",r.createElement(t.p,null,"The ",r.createElement(t.a,{href:"https://www.codeandweb.com/texturepacker/documentation/texture-settings#image-quality"},"Image quality"),"\ncan be configured with ",r.createElement(t.code,null,"--astc-quality <0-4>"),", default value is 2.",r.createElement("br"),"\nFor other options (scaling, trimming transparency, ...) have a look at the\n",r.createElement(t.a,{href:"https://www.codeandweb.com/texturepacker/documentation/image-conversion"},"Image conversion")," documentation."))}var c=function(e){void 0===e&&(e={});const{wrapper:t}=Object.assign({},(0,n.R)(),e.components);return t?r.createElement(t,e,r.createElement(a,e)):a(e)},m=l(41971),o=l(11042),i=l(46942),s=l.n(i),d=l(44753),u=l(24012),E=l(77891),g=l(90177),f=l(81851);function p(e){let{data:t,children:l}=e;const n=(0,r.useContext)(d.d),a=!!n.related,c=!!n.product&&"none"!==n.product;return(0,r.useEffect)((()=>{f.mm.event("read knowledgebase entry",{title:n.title,slug:n.slug.split("/").filter(Boolean).pop(),product:c?n.product:"none"})})),r.createElement(E.W,null,r.createElement("div",{className:"container mx-auto"},r.createElement("div",{className:s()("break-words sm:break-normal mx-auto flex justify-center")},r.createElement("main",{id:"main-content",className:"overflow-hidden"},r.createElement(m.Y,{pageData:n,smallHeading:!0}),r.createElement("div",{className:s()("px-4 mt-8 prose break-words sm:break-normal mb-12 max-w-4xl")},l),r.createElement("div",{className:"my-12 text-center text-blue-600 text-sm"},r.createElement(g.A,{className:"mt-8",to:c?"/"+n.product+"/support":"/support"},"Show all FAQ entries >"))),a&&r.createElement("aside",{className:"order-2 bg-gray-50 hidden lg:block"},r.createElement("div",{className:"sticky top-0"},r.createElement("div",{className:"h-screen justify-between flex flex-col w-64 2xl:w-80"},r.createElement(u.K,{related:n.related})))))))}function h(e){return r.createElement(p,e,r.createElement(c,e))}const x=e=>{let{pageContext:t}=e;return r.createElement(r.Fragment,null,r.createElement(o.A,{pageData:t.pageData}))}},13709:function(e,t,l){var n=l(82839).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},13763:function(e,t,l){var n=l(82839);e.exports=/MSIE|Trident/.test(n)},24012:function(e,t,l){l.d(t,{K:function(){return a}});var n=l(90177),r=l(96540);const a=e=>{let{related:t}=e;return t&&r.createElement("nav",{"aria-label":"Related pages",className:"py-4 px-2 bg-gray-100 text-xs"},r.createElement("h2",{className:"font-bold pr-0 uppercase text-gray-600 my-1 pb-2 border-l-4 border-transparent"},"Related Pages"),r.createElement("ul",{className:"border-l-4 border-transparent"},t.map((e=>{let{title:t,url:l}=e;return r.createElement("li",{key:t,className:"pb-2"},r.createElement(n.A,{to:l,className:"text-gray-700 hover:text-gray-900 hover:underline"},t))}))))}},26910:function(e,t,l){var n=l(46518),r=l(79504),a=l(79306),c=l(48981),m=l(26198),o=l(84606),i=l(655),s=l(79039),d=l(74488),u=l(34598),E=l(13709),g=l(13763),f=l(39519),p=l(3607),h=[],x=r(h.sort),v=r(h.push),w=s((function(){h.sort(void 0)})),b=s((function(){h.sort(null)})),C=u("sort"),T=!s((function(){if(f)return f<70;if(!(E&&E>3)){if(g)return!0;
1if(p)return p<603;var e,t,l,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:l=3;break;case 68:case 71:l=4;break;default:l=2}for(n=0;n<47;n++)h.push({k:t+n,v:l})}for(h.sort((function(e,t){return t.v-e.v})),n=0;n<h.length;n++)t=h[n].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));n({target:"Array",proto:!0,forced:w||!b||!C||!T},{sort:function(e){void 0!==e&&a(e);var t=c(this);if(T)return void 0===e?x(t):x(t,e);var l,n,r=[],s=m(t);for(n=0;n<s;n++)n in t&&v(r,t[n]);for(d(r,function(e){return function(t,l){return void 0===l?-1:void 0===t?1:void 0!==e?+e(t,l)||0:i(t)>i(l)?1:-1}}(e)),l=m(r),n=0;n<l;)t[n]=r[n++];for(;n<s;)o(t,n++);return t}})},34598:function(e,t,l){var n=l(79039);e.exports=function(e,t){var l=[][e];return!!l&&n((function(){l.call(null,t||function(){return 1},1)}))}},41971:function(e,t,l){l.d(t,{Y:function(){return x}});var n=l(98587),r=l(96540);const a=["className"];var c=e=>{let{className:t}=e,l=(0,n.A)(e,a);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor"},l,{className:t||"inline-block h-4"}),r.createElement("path",{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}))},m=l(55848);const o=["className"];var i=e=>{let{className:t}=e,l=(0,n.A)(e,o);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",fill:"currentColor"},l,{className:t||"inline-block h-4"}),r.createElement("path",{d:"M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"}))};function s(e){let{tags:t}=e;return r.createElement("div",{className:"flex items-center"},r.createElement(i,{className:"inline-block h-3 mr-2 shrink-0"}),r.createElement("div",null,t.map(((e,t)=>[t>0&&r.createElement("span",{key:"comma-"+e},",  "),r.createElement(m.F,{key:e,className:"underline hover:text-gray-900",tag:e},e)]))))}var d=l(32532),u=l(24794);const E=["className"];var g=e=>{let{className:t}=e,l=(0,n.A)(e,E);return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",fill:"currentColor"},l,{className:t||"inline-block h-4"}),r.createElement("path",{d:"M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"}))},f=l(93069),p=l(46942),h=l.n(p);const x=e=>{let{pageData:t,image:l,smallHeading:n=!1}=e,a=!1,m="",o="";if(t.date){const e=new Date(Date.parse(t.date)),l=(0,u.useStaticQuery)("1552981879"),n=new Date(Date.parse(l.currentBuildDate.currentDate)),r=864e5,c=Math.floor((n.getTime()-e.getTime())/r);m=e.toLocaleDateString("en-US",{dateStyle:"long"}),o=e.toISOString(),a=c<365}const{title:i,authors:E,tags:p,github:x}=t,v={"@context":"https://schema.org","@type":"TechArticle",headline:i,author:E.map((e=>({"@type":"Person",name:e}))),dateModified:o};if(l){const e=(0,d.d)(l);e&&(v.image=e)}const w=(0,d.c)(l||null),b=n?"text-xl":"text-3xl";return r.createElement("div",{className:"px-4 max-w-4xl"},r.createElement("h1",{className:h()(b,"font-bold mb-2 mt-8")},i),r.createElement("div",{className:"text-gray-500 mb-4 mt-2 flex gap-x-4 gap-y-2 items-baseline text-xs flex-wrap"},E.length>0&&r.createElement("div",{className:"flex items-center"},r.createElement(c,{className:"inline-block h-3 mr-2"}),E.join(", ")),a&&r.createElement("div",{className:"flex items-center"},r.createElement(g,{className:"inline-block h-3 mr-2"}),r.createElement("span",{className:"sr-only"},"Last updated: "),r.createElement("time",{dateTime:o},m)),p.length>0&&r.createElement(s,{tags:p}),x&&r.createElement("a",{href:t.github,target:"_blank",rel:"nofollow noopener noreferrer",className:"underline hover:text-gray-900 flex items-center ml-auto"},r.createElement(f.A,{className:"inline-block h-[0.95rem] mr-2"}),"GitHub")),w&&r.createElement(d.G,{image:w,className:"w-full object-cover",alt:i,loading:"eager"}),r.createElement("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(v)}}))}},55848:function(e,t,l){l.d(t,{F:function(){return c}});var n=l(96540),r=l(24794),a=l(90177);const c=e=>{let{tag:t,className:l,children:c,style:m}=e;const o=(0,r.useStaticQuery)("3366868556").allMainTutorialsYaml.nodes[0].mainTutorialIndices.find((e=>e.name===t)),i=o?o.defaultUrl?o.defaultUrl:"/tutorials/"+t:"/tags/"+t;return n.createElement(a.A,{to:i,className:l,style:m},c)}},67680:function(e,t,l){var n=l(79504);e.exports=n([].slice)},74488:function(e,t,l){var n=l(67680),r=Math.floor,a=function(e,t){var l=e.length;if(l<8)for(var c,m,o=1;o<l;){for(m=o,c=e[o];m&&t(e[m-1],c)>0;)e[m]=e[--m];m!==o++&&(e[m]=c)}else for(var i=r(l/2),s=a(n(e,0,i),t),d=a(n(e,i),t),u=s.length,E=d.length,g=0,f=0;g<u||f<E;)e[g+f]=g<u&&f<E?t(s[g],d[f])<=0?s[g++]:d[f++]:g<u?s[g++]:d[f++];return e};e.exports=a},84606:function(e,t,l){var n=l(16823),r=TypeError;e.exports=function(e,t){if(!delete e[t])throw new r("Cannot delete property "+n(t)+" of "+n(e))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.