# PVRTexToolCL.exe -square + not rounding up.

**URL:** <https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837>\
**Category:** PowerVR Insider\
**Tags:** pvrtextool\
**Created:** [July 3, 2013, 9:48pm UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837 "2013-07-03T21:48:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhyeung](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@nhyeung](https://forums.imgtec.com/u/nhyeung)\
**Post date:** [July 3, 2013, 9:48pm UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837/1 "2013-07-03T21:48:35Z")

</div>

I’m using Version 3.40 of PVRTexToolCL, and trying to round my texture size up when using the -square option. There seems to be a bug, and it always rounds it down.  
  
  
  
My command is:  
  
pvrtextoolcl -i input.png -o output.pvr -legacypvr -square + -flip y,flag -q pvrtcbest -f PVRTC1\_4

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [July 9, 2013, 6:12am UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837/2 "2013-07-09T06:12:47Z")

</div>

Hi Nhyeung,  
  
  
  
The square operation is performing correctly as far as I can tell - it’s worth noting that this does option NOT cause the texture to become POT; that is now a separate option: “-pot”. If you want to make your texture a square power of two, you should use the following amended command:  
  
  
  
pvrtextoolcl -i input.png -o output.pvr -legacypvr -square + **-pot +** -flip y,flag -q pvrtcbest -f PVRTC1\_4  
  
  
  
Regards,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![nhyeung](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@nhyeung](https://forums.imgtec.com/u/nhyeung)\
**Post date:** [July 9, 2013, 8:18pm UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837/3 "2013-07-09T20:18:52Z")

</div>

Thanks for the reply.  
  
  
  
I did a little more testing, and I found the case where it fails. If the png is 512x128, using the -square + option will produce a pvr of size 512x512.  
  
  
  
If the png is 128x512, using the same command will give a texture of size 128x128.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [July 10, 2013, 7:11am UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837/4 "2013-07-10T07:11:25Z")

</div>

Hi Nhyeung,  
  
  
  
Yep ok, you’ve definitely found a bug there! Curse my not testing in both directions 🙂 I usually do as well… Anyway, figured out the bug - apparently I was checking the maximum against the depth of the texture instead of the height. Whoops. Min works as expected at least. I’ll check in this fix and it will be in the next release. If this is a blocking issue for you, feel free to email [DevTech@imgtec.com](mailto:DevTech@imgtec.com), and we can send you an engineering drop ahead of time.  
  
  
  
Regards,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![nhyeung](https://avatars.discourse-cdn.com/v4/letter/n/ad7895/32.png) [@nhyeung](https://forums.imgtec.com/u/nhyeung)\
**Post date:** [July 10, 2013, 8:21pm UTC](https://forums.imgtec.com/t/pvrtextoolcl-exe-square-not-rounding-up/1837/5 "2013-07-10T20:21:25Z")

</div>

Thanks, but I already implemented a work around this. Glad to be of service.
