Transformation erroneously replacing all overlay spaces to underscore

Open
#160 9 comments 0 reactions 1 assignee View on GitHub

@aditimadan-Cloudinary is already working on this.

Since May 5, 2019.

Assessment

This issue has not been assessed yet.

Description

question

Currently, Transformation class is replacing all spaces on parameters to underscore in this line:
https://github.com/cloudinary/cloudinary_java/blob/738b328a9057084097b7e381bf8a6e989cf69b43/cloudinary-core/src/main/java/com/cloudinary/Transformation.java#L723

This is causing some issues, like when I try to use some font name that contains spaces (eg: Roboto Condensed), it replaces with underscores and the URL become invalid (because font is invalid). The same applies to text content (overlay), when using the text My Text Content it appears on final Image as My_Text_Content.

Example:

cloudinary.url()
		.signed(true)
		.resourceType("video")
		.transformation(new Transformation()
				.height(480)
				.width(720)
				.crop("fill")
				.chain()
				.color("white")
				.overlay("text:Roboto_70_bold:My Text Content"))
		.format("jpg")
		.generate("video/2130");

Results in:

Dominant language
Java
Stars
176
Forks
113
Avg merge
9d 20h
Merged PRs (30d)
2

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudinary/cloudinary_java

All issues in cloudinary/cloudinary_java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.